Highlighted
Absent Member.
Absent Member.
583 views

Test status in Test Lab

Hi,
I'd like to prevent testers from changing the status of a test/test run in a test set to N/A. They should be able to change from any status to any of the others (i.e. Passed, Failed, No Run, Not Completed). Does anyone know the workflow script to achieve this?

Thanks
0 Likes
4 Replies
Highlighted
Admiral Admiral
Admiral

Hi,

For Changing the test instance status, your workflow script could look like this:

Function TestSetTests_FieldCanChange (FieldName, NewValue)
TestSetTests_FieldCanChange = True
if FieldName= "TC_STATUS" and NewValue="N/A" then
MsgBox "Value N/A is not allowed."
TestSetTests_FieldCanChange = FALSE
end if
End Function

This is an example code for preventing users to change the Run Status to "N/A":

Function Run_CanPost
On Error Resume Next
Run_CanPost = DefaultRes
if Run_Fields.Field("RN_STATUS").Value="N/A" then
MsgBox "Value N/A is not allowed."
Run_CanPost = False
end if
On Error GoTo 0
End Function
Highlighted
Absent Member.. Absent Member..
Absent Member..

Did you try something like...

if TestSet_Fields("CY_STATUS").Value = "N/A" then
' Bug_Fields("BG_USER_06").IsVisible = True
'Bug_Fields("BG_USER_06").IsRequired = True
Msgbox ("Users should not select N/A for a Test Set")
else
TestSet_Fields("CY_STATUS").IsVisible = True
TestSet_Fields("CY_STATUS").IsRequired = True
End if
0 Likes
Highlighted
Absent Member.
Absent Member.


Hello...

I have a TestSetTests_FieldCanChange = FALSE line inside some conditions under the Sub TestLab_TestSetTests_FieldChange(FieldName)

However, it doesn't prevent the user from changing values for a user defined field such as "TS_USER_10" (a user field in Test in Test Set)

Is this normal?

Regards
Rajan
0 Likes
Highlighted
Absent Member.
Absent Member.

Another way to do this is to go to Tools --> Customize --> Groups --> Choose the group that you want --> Click on "Change" --> Click on "Test Lab" --> Expand the "Modify test in test set" option --> Click on Status --> Click on Add and add the required transition rules.

The only catch is that we will not be able to modify the settings for the default QC groups.
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.