Quality Center / ALM Practitioners Forum
cancel

HP ALM 12.5 - How to Make Test Sets Read Only in Test Lab Module

SOLVED
Go to solution
Highlighted
Sohel Respected Contributor..
Respected Contributor..

HP ALM 12.5 - How to Make Test Sets Read Only in Test Lab Module

Hello,

I had posted this question to wrong forum. I am trying to make particular test sets Read Only, meaning no one will be able to run, delete or modify these particular test sets and the . 

From HP ALM's Practitioner's forum, I found that following will take away "Run" ability for all tests (I 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): 

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

But when I try to put a particular test set in an If Then Else logic, the above code does not work as it still does not show "Run" for all test sets and not only Test set with id 103. For example: 

  If TestSet_Fields.Field("TC_Cycle_ID").Value = 103 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

 Thank you.

Sohel

1 ACCEPTED SOLUTION

Accepted Solutions
Sohel Respected Contributor..
Respected Contributor..
Solution

Re: HP ALM 12.5 - How to Make Test Sets Read Only in Test Lab Module

I have found the answer to my question after getting feedback in StackOverflow. 

After changing TC_CYCLE_ID to CY_CYCLE_ID, the code worked as expected. 

Thanks.

Sohel

3 REPLIES
Jan Czajkowski Acclaimed Contributor..
Acclaimed Contributor..

Re: HP ALM 12.5 - How to Make Test Sets Read Only in Test Lab Module

Try removing the "Visible" lines. The visibility of a button is loaded when you log in, so you can't toggle it.

Then add an Else branch for the rest of the Test Sets.

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

[Please do not contact me off line for receiving support. Use the forum!]
Sohel Respected Contributor..
Respected Contributor..

Re: HP ALM 12.5 - How to Make Test Sets Read Only in Test Lab Module

Thanks for your feedback Jan. 

I have changed the code (in Test Lab module Script --> TestSet_MoveTo Sub) to following but 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 below. Also, even when test sets show disabled Run button, the Status of a test set can be changed through Execution Grid. How can I disable this field? 

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

Thanks, 

Sohel

 

Sohel Respected Contributor..
Respected Contributor..
Solution

Re: HP ALM 12.5 - How to Make Test Sets Read Only in Test Lab Module

I have found the answer to my question after getting feedback in StackOverflow. 

After changing TC_CYCLE_ID to CY_CYCLE_ID, the code worked as expected. 

Thanks.

Sohel

Top Contributors Last 30 Days