Highlighted
Absent Member.
Absent Member.
5492 views

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.
0 Likes
47 Replies
Highlighted
Absent Member.. Absent Member..
Absent Member..

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
0 Likes
Highlighted
Fleet Admiral
Fleet Admiral

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.
Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
0 Likes
Highlighted
Absent Member.
Absent Member.

Refer to the Send mail example which is available in the Adminstration guide under topic Work flow customization.

Madhavi
0 Likes
Highlighted
Absent Member.
Absent Member.

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
0 Likes
Highlighted
Fleet Admiral
Fleet Admiral

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".
Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
0 Likes
Highlighted
Absent Member.
Absent Member.

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
0 Likes
Highlighted
Fleet Admiral
Fleet Admiral

Any error messages? Is email working for the Defects module?
Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
0 Likes
Highlighted
Fleet Admiral
Fleet Admiral

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?
Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
0 Likes
Highlighted
Absent Member.
Absent Member.

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
0 Likes
Highlighted
Fleet Admiral
Fleet Admiral

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

[Please do not contact me off line for receiving support. Use the forum!]
0 Likes
Highlighted
Absent Member.
Absent Member.

I tried already.. I am not getting message box
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.