Loop Options Tab - Step Properties Dialog Box
- Aktualisiert2025-07-21
- 2 Minute(n) Lesezeit
Loop Options Tab - Step Properties Dialog Box
Loop Options Tab
The Loop Options tab of the Step Properties dialog box configures an individual step to run repeatedly in a loop when it executes. To loop on several steps at once, place the steps in a new sequence, create a Sequence Call step that calls the sequence, and then loop on the Sequence Call step.
The Loop Options tab contains the following options:
-
Loop Type
—Specifies one of the following types of looping for the step:
- None —TestStand does not loop on the step. This is the default value.
- Fixed number of loops —TestStand loops on the step a specified number of times and determines the final pass or fail status of the step based on the percentage of loop iterations in which the step status is Passed .
- Pass/Fail count —TestStand loops on the step until the step passes or fails a specified number of times or until a maximum number of loop iterations complete. TestStand determines the final status of the step based on whether the specified number of passes or failures occurred or whether the maximum number of loop iterations was reached.
-
Custom
—Customizes the looping behavior for the step. You can specify a Loop Initialization expression, a Loop Increment expression, a Loop While expression, and a final Loop Status expression. The following example code illustrates the order in which TestStand uses the loop
expressions
:
Loop_Initialization_Expression; while (Loop_While_Expression == True) {
Execute_Step; Loop_Increment_Expression;
} Loop_Status_Expression;
- Record Result of Each Iteration —Adds the step result to the sequence results list after each loop iteration. TestStand also adds the final result it computes for the step loop as a whole if you have enabled the Result Recording Option on the Run Options panel of the Step Settings pane for the step.
- Loop Initialization Expression —The expression TestStand evaluates before looping. For the Fixed number of loops option, the expression is RunState.LoopIndex = 0 .
- Loop Increment Expression —The expression TestStand evaluates before and after executing each step. For the Fixed number of loops option, the expression is RunState.LoopIndex += 1 .
- Loop While Expression —The expression TestStand evaluates before executing the step. If the expression evaluates to True , TestStand executes the step. Otherwise, the looping stops. For the Fixed number of loops option, the default expression is RunState.LoopIndex < 10 .
- Loop Status Expression —The expression TestStand evaluates to determine the status for the final cumulative result. For the Fixed number of loops option, the default expression is RunState.LoopNumPassed / RunState.LoopNumIterations < 1 ? "Failed" : "Passed"