Highlighted
Respected Contributor.. Sohel Respected Contributor..
Respected Contributor..
945 views

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

Jump to solution

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

Tags (3)
0 Likes
1 Solution

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

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

Jump to solution

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

0 Likes
3 Replies
Knowledge Partner Knowledge Partner
Knowledge Partner

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

Jump to solution

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!]
Respected Contributor.. Sohel Respected Contributor..
Respected Contributor..

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

Jump to solution

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

 

0 Likes
Respected Contributor.. Sohel Respected Contributor..
Respected Contributor..

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

Jump to solution

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

0 Likes
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.