Automail from Test Lab/Test Set in Quality Center 10.0

Is there a way to set up a notification or automail to be sent to a group when a Test is changed to the status of failed /failed in Test Lab/test set modules.

Currently quality center 10.00 supporting only modules Defect to send auto mail.
  • Test Lab->select the test set

    navigate to automation

    check in notification.....

    in To: you can speficy the group, whom you want to send automail/notification.

    ~~Shivaram
  • These notifications only work if you are using the Automatic Runner when running your tests. You probably don´t want that if you are only running manual tests.

    If you want automatic email from the Manual Runner, use the SendMail or Mail methods from the workflow.
  • Refer to the Send mail example which is available in the Adminstration guide under topic Work flow customization.

    Madhavi
  • I have copied the code from admin guide and paste it in test plan module.. But it does not work.. code is here for your ref

    Sub Test_FieldChange(FieldName)
    On Error Resume Next
    'panneer's code begin here


    Dim strSubject, strComment
    If FieldName = "TS_STATUS" Then
    strSubject = "Test Change Notification" & _
    " for project " & TDConnection.ProjectName & _
    " in domain " & TDConnection.DomainName
    strComment = "The user " & User.FullName & _
    " changed the status of the test " & _
    Test_Fields("TS_NAME").Value & _
    " to " & Test_Fields("TS_ STATUS").Value
    SendTest Test_Fields("TS_TEST_ID").Value, _
    Test_Fields("TS_RESPONSIBLE").Value, "[QA Testers]", _
    strSubject, StrComment
    End If

    'panneer's code end here

    On Error GoTo 0
    End Sub

    Sub SendTest (iObjectId, strTo, strCc, strSubject, strComment)
    On Error Resume Next
    Dim objBugFactory, objBug
    Set objBugFactory = TDConnection.TestFactory
    Set objBug = objBugFactory.Item(iObjectId)
    objBug.Mail strTo, strCc, 2, strSubject, strComment
    Set objBug = Nothing
    Set objBugFactory = Nothing
    PrintError "SendStatus"
    On Error GoTo 0
    End Sub
  • When you try out workflow code, always remember to comment out all On Error Resume Next ... On Error Goto 0 lines. Otherwise it is very difficult to debug your script.

    A quick glance at your script makes me guess the problem might be that you named the group "QA Testers". If you are referring to one of the builtin QC groups it should be "QATester".
  • Hi Jan,

    Thanks for your reply.

    Please see the updated scripts for your ref.. Automail not working.

    Sub Test_FieldChange(FieldName)
    ' On Error Resume Next
    'panneer's code begin here

    Dim strSubject, strComment
    If FieldName = "TS_STATUS" Then
    strSubject = "Test Change Notification" & _
    " for project " & TDConnection.ProjectName & _
    " in domain " & TDConnection.DomainName
    strComment = "The user " & User.FullName & _
    " changed the status of the test " & _
    Test_Fields("TS_NAME").Value & _
    " to " & Test_Fields("TS_ STATUS").Value
    SendTest Test_Fields("TS_TEST_ID").Value, _
    Test_Fields("TS_RESPONSIBLE").Value, "[QATester]", _
    strSubject, StrComment
    End If

    'panneer's code end here

    'On Error GoTo 0
    End Sub


    Sub SendTest (iObjectId, strTo, strCc, strSubject, strComment)
    'On Error Resume Next
    Dim objBugFactory, objBug
    Set objBugFactory = TDConnection.TestFactory
    Set objBug = objBugFactory.Item(iObjectId)
    objBug.Mail strTo, strCc, 2, strSubject, strComment
    Set objBug = Nothing
    Set objBugFactory = Nothing
    PrintError "SendStatus"
    'On Error GoTo 0
    End Sub
  • Any error messages? Is email working for the Defects module?
  • Sorry, I didn't observe until now that you want actually to have the email sent from Test Lab. The workflow code you posted will send an email when you change test case status in the Test Plan module - for example from Design to some other status.

    You might instead take a look at the Manual Runner workflow. Or would you not rather have the email sent when you create a new defect from the Manual Runner?
  • Hi Jan,

    Getting automail from Defect module..

    I am not getting from Test Plan and Test Lab module.

    When i change the status from design to ready to test/review... The responsible person/reviewer should get auto email.

    Pls help
  • Check out if your SendTest is really executing and what the variables contain - put in message boxes to display the values.