Adebayo Somotun

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2009-10-28
10:00
613 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
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
4 Replies


Admiral
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2009-10-28
12:05
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
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


Absent Member..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2009-10-28
12:05
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
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
vmad

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2010-01-20
12:13
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
Shivaraj

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2010-01-21
03:22
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 only catch is that we will not be able to modify the settings for the default QC groups.