Is there a method for checking which sequence has run if I am editing a Model? I am attempting to use a Model to check for when a Main Sequence test is running based on an expression. It would check when a sub-sequence is called by the main sequence and then get the name of the Main Sequence running once. I am new to teststand and need some help doing this.
It my be better to understand why you need to do this. There may be a better method.
I'm still a bit confused by what you are looking for. So you are trying to edit the process model but want to know if something is executing? Just look at your executions.
There is the ProcessModelPostStep/PreStep engine callbacks that can be placed in your model. Those get triggered when any step in your client executes. You could check to see if the step was a sequence call and if it was in MainSequence.
Hope this helps,
Thank you for your response. The solution you have mentioned is correct, however I have an issue with multiple entires and I was curious as if there was a way to scan for the main step once and only list it once if there are multiple steps.
The expression you mentioned in the ProcessModelPostStep works i.e. Runstate.Caller.Main.Step, which will return the Main Sequence steps, but all of them. I was curious as if there was a way to just return the tests in the Main Sequence and not any labels, or files that I have in the steup? Is there such a command that exists or a way to hide these items?
Assuming you only want "tests" to show up, you could try using a precondition to only include steps whose step type (Step.StepType.Name) includes "Test" in the step type name.
Hope this helps.
I just had a thought. Are you trying to get those steps off the report? If so then just disable result recording for those steps. Every step has the ability to disable result recording. Then it does not show on the report.
Unfortunately the result recording options are already disabled and I am attempting to filter out unnecssary steps, expressions, from setup and cleanup and labels within the entire sequence from appearing on my report. The report is exported via UImessages to Labview and sent to a note file for review.
How would I exactly go about this as I am new to the TestStand environment. Could you provide with an expression example and possibly some explanation?