问题
I am trying to make particular test set Read Only, meaning no one will be able to run, delete or modify these particular test set.
I also don't know how to make Test Sets and also Folders Read Only for Delete and Modify functions yet, any help there I will be thankful too):
In Test Lab module Script --> TestSet_MoveTo Sub:
If TestSet_Fields.Field("TC_Cycle_ID").Value = 103 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
Now it disables "Run" button for all test sets in Test Lab in addition to Test Set with Test Set ID 103. I'm not sure if I'm doing anything wrong in coding above. This should have only disabled the Run and RunTestSet buttons for Test Set ID 103.
Also, even when test sets show disabled Run button (for all test sets), the Status of a test set can be changed through Execution Grid. How can I disable this field?
Thanks.
回答1:
You need to use the CY_CYCLE_ID
and not the TC_Cycle_ID
field.
If TestSet_Fields.Field("CY_CYCLE_ID").Value = "103" then
....
End If
As you can see, the CY_CYCLE_ID
field represents the testset ID:
来源:https://stackoverflow.com/questions/43009917/hp-alm-12-5-how-to-make-test-sets-read-only-in-test-lab-module