How can I make the the Test Sets within the Test Lab module read only?
Question ID: 107614
0
0

I am trying to make a particular test set in the Test Lab module Read Only so no one will be able to run, delete or modify these particular tests. I found the following script, which will keep anyone from running the tests, but I also need to prevent them from being deleted or modified.

Actions.Action("TestSetView.Run").Enabled = FALSE
Actions.Action("TestSetView.Run").Visible = FALSE
Actions.Action("TestSetView.RunTestSet").Enabled = FALSE
Actions.Action("TestSetView.RunTestSet").Visible = FALSE

When I try to put a particular test set in the following If Then Else logic, it breaks the previous code, as it still doesn't show "Run" for all test sets, including the Test set with ID 20.

If TestSet_Fields.Field("TC_Cycle_ID").Value = 20 Then
Actions.Action("TestSetView.Run").Enabled = FALSE
Actions.Action("TestSetView.Run").Visible = FALSE
Actions.Action("TestSetView.RunTestSet").Enabled = FALSE
Actions.Action("TestSetView.RunTestSet").Visible = FALSE
End If

Marked as spam
Posted by (Questions: 239, Answers: 31)
Asked on April 26, 2017 7:40 pm
92 views
Answers (1)
0
Private answer

I would like for you to start with removing the ''Visible'' lines from your script. After you have removed the ''visible'' lines from your script, I would then Then try adding an 'Else' statement for the remaining Test Sets as displayed below.

If TestSet_Fields.Field(''TC_Cycle_ID'').Value = 20 Then
Actions.Action(''TestSetView.Run'').Enabled = FALSE
Actions.Action(''TestSetView.RunTestSet'').Enabled = FALSE
Else
Actions.Action(''TestSetView.Run'').Enabled = TRUE
Actions.Action(''TestSetView.RunTestSet'').Enabled = TRUE
End If

After you have made those changes, retest to see if the test sets are now read only.

Hope this helps!

Marked as spam
Posted by (Questions: 2, Answers: 300)
Answered on April 26, 2017 7:43 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top