NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Count how many times a step is executed

Solved!
Go to solution
Hello. Is there a method to count how many times a type of step is executed? I have multiple uses of this type of step so I search for a easier method putting a post-expression at every call of this step.
0 Kudos
Message 1 of 3
(2,465 Views)

Is it a custom step type?  If so, you could increment a fileglobal in the post-step of your custom step.

 

Alternatively, this could be done in SequenceFilePostStep.  something like:

If (RunState.CallingStep.StepType.Name=="Your custom step type")

fileglobals.counter++

0 Kudos
Message 2 of 3
(2,442 Views)
Solution
Accepted by topic author donnie_og

The execution profiler is also a way you could get this info without modifying the step type or sequence file. This would be an okay method if you only need to get this info periodically (on-demand) rather than after each execution.

 

If you need it after each execution, why not just use a results processing plug-in? You can make an extra instance of the report generator or database plug-in, and use a filter expression to only log results for your step type.

 

Hope this helps!

Trent

https://www.linkedin.com/in/trentweaver
Message 3 of 3
(2,434 Views)