05-24-2018 04:21 AM
Hi Everyone,
Whenever the user clicks on "Execute" in TestStand menu we can see the following options [ Test UUT, Single Pass, Run Selected Sequence, etc., ]. Suppose If I have a Subsequence named as "Sequence 1" in a sequence as shown in the below image.
If the user has Selected "Run Sequence1" option from Execution menu, How can I programmatically know that in the sequence? I mean is there any variable which stores the option selected by the user. I would like to do some manipulations in the sequence steps depending on the option selected.
Solved! Go to Solution.
05-24-2018 04:40 AM
Yes we can invoke the information using Run State during Run time, but you cant run sub sequences just like that as it demands information from main Sequences.
You have to make sure Main Sequence is getting Executed which in turn will call other sequences.
05-24-2018 05:36 AM
Can you explain the point 1 in detailed? I tried checking the run state options by invoking the "runstate.execution" reference but the result gives information about the sequence run state, Which is not my requirement.
The sequence I am speaking about will not have any dependencies from Main Sequence. The user can run Sequence1 directly. It will do a specific task depending on the selected execution option.
05-24-2018 05:47 AM
The very Simple solution will be call this syntax in a statement "ThisContext.RunState.SequenceFile.Path" Assign this to some variable, Strip the File name from Full path
05-24-2018 06:05 AM
I have already tried it. That doesn't suit my requirement. I guess you misunderstood the question.
05-24-2018 08:30 AM
Hi Reddy_Garu,
If you want to know where the execution first started, the following will give you the name of the execution entry point:
RunState.Root.Sequence.Name
The will display the name of the first sequence that the execution called as a string.
I hope this helps.
-Jack