Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
AKR Absent Member.
Absent Member.
325 views

How can I stop users from running scripts from a particular test set under test lab

Jump to solution
I have a set of scripts that have been completed in execution. How can I stop users from going ahead and selecting the test sets from a particular folder by mistake and trying to re-run their scripts again. Lets say I have two cycles C1 and C2. I want to block all users from executing scripts under folder C1 since its already complete. How can this be achieved?
0 Likes
1 Solution

Accepted Solutions
SreeKrishnan Absent Member.
Absent Member.

Re: How can I stop users from running scripts from a particular test set under test lab

Jump to solution
Here is a sample code that can work with a specific testset under ActionCanExecute (when to try to run the test with Run button). You may need to this for the other options , Runtestset and continue manual run.

Make sute you enter the code after
ActionCanExecute = DefaultRes

as the above statement may override the condition set by the below logic.

If ActionName = "act_run" Then

If TDConnection.TestSetFactory.Item(TestSetTest_Fields.Field("TC_CYCLE_ID").value).name = "TEST1" then
ActionCanExecute = False
Else
ActionCanExecute = True
End If
End If
14 Replies
SreeKrishnan Absent Member.
Absent Member.

Re: How can I stop users from running scripts from a particular test set under test lab

Jump to solution
This can be done with help of the actions that gets triggered when the user executes the test. You can disable the actions Run Manually,Run Test Set and Continue Manual Run for the test set or test set folder.

Instead you can move the folder C1 to Completed Tests folder and let know your users not to execute tests under that folder.
0 Likes
AKR Absent Member.
Absent Member.

Re: How can I stop users from running scripts from a particular test set under test lab

Jump to solution
Hi Sree,
Thanks. I was trying to set the action for Run and Continue Manul Run etc., Unfortunately I am not finding the exact function names for these. Can you help me out with the syntax and also if you have an example. Where can i find all the functions similar to this in QC guides.
0 Likes
SreeKrishnan Absent Member.
Absent Member.

Re: How can I stop users from running scripts from a particular test set under test lab

Jump to solution
You can find the names of the action by having a message box on your ActionCanExecute function. The message box will let you know the name of the action that you trigger on the application interface

MsgBox ActionName
0 Likes
AKR Absent Member.
Absent Member.

Re: How can I stop users from running scripts from a particular test set under test lab

Jump to solution
Thanks dude.
0 Likes
SreeKrishnan Absent Member.
Absent Member.

Re: How can I stop users from running scripts from a particular test set under test lab

Jump to solution
Here is a sample code that can work with a specific testset under ActionCanExecute (when to try to run the test with Run button). You may need to this for the other options , Runtestset and continue manual run.

Make sute you enter the code after
ActionCanExecute = DefaultRes

as the above statement may override the condition set by the below logic.

If ActionName = "act_run" Then

If TDConnection.TestSetFactory.Item(TestSetTest_Fields.Field("TC_CYCLE_ID").value).name = "TEST1" then
ActionCanExecute = False
Else
ActionCanExecute = True
End If
End If
AKR Absent Member.
Absent Member.

Re: How can I stop users from running scripts from a particular test set under test lab

Jump to solution
Thanks Sree. I am trying a similar code. I will try yours and let you know.
0 Likes
Highlighted
AKR Absent Member.
Absent Member.

Re: How can I stop users from running scripts from a particular test set under test lab

Jump to solution
Thanks Sree. I did the condition similar to what you had put in except without using tdc connection and it worked. Whats the function for continue manual run. is it act_continue_manual_run?
0 Likes
AKR Absent Member.
Absent Member.

Re: How can I stop users from running scripts from a particular test set under test lab

Jump to solution
Also,
Whats the command for Run Manually and Continue Manul Run. I need to fit the code for these two also please.
Thanks
0 Likes
AKR Absent Member.
Absent Member.

Re: How can I stop users from running scripts from a particular test set under test lab

Jump to solution
Dont Worry. Got it.
0 Likes
AKR Absent Member.
Absent Member.

Re: How can I stop users from running scripts from a particular test set under test lab

Jump to solution
My Apologies. I need the two commands please. I thought I got it, but its not working. Can you please provide the action names for "Continue Manual Run" button and "Run Manually" Button under Test Lab.
0 Likes
SreeKrishnan Absent Member.
Absent Member.

Re: How can I stop users from running scripts from a particular test set under test lab

Jump to solution
Run Manually (act_run_manually)
Continue Manual Run (act_continue_man_run)
RunTestSet (act_run_test_set)
0 Likes
AKR Absent Member.
Absent Member.

Re: How can I stop users from running scripts from a particular test set under test lab

Jump to solution
Thanks Sree. Where can I find such function names.
0 Likes
SreeKrishnan Absent Member.
Absent Member.

Re: How can I stop users from running scripts from a particular test set under test lab

Jump to solution
The only way I know is to have a message box function on ACtionCanExecute to find the action name for any event on the application interface.

MsgBox ActionName
0 Likes
AKR Absent Member.
Absent Member.

Re: How can I stop users from running scripts from a particular test set under test lab

Jump to solution
Hi Sree,
Thanks. I will try that.
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.