There are few methods that you can use to loop the TestStand sequence continuously without getting any message pop out. In this article, we will be introducing two methods.
- Using Sequences File Callbacks in Test UUTs
- Using Looping to Execute Main Sequences in Single Pass
- Right click on the Sequences pane and select Sequences File Callbacks.
- Tick on the checkbox of PreUUT and PostUUT and click OK to add them into the Sequences pane.
Note: PreUUT is responsible to show the pop out dialog box of entering the UUT serial number and whether the user would like to proceed for the next test; while PostUUT is responsible to show the test result whether it is passed, failed, error or terminated. - Click on the PreUUT on Sequences pane. Right click on the Call DoPreUUT step and select Run Mode >> Skip to avoid the dialog box pop out.
Note: By skipping the Call DoPreUUT step, you will not able to stop the test via the message dialog box anymore. You will either need to manually add a step to include that or press on the termination button to stop the execution abruptly. - Repeat step 3 for PostUUT sequence to skip the message pop out dialog box that show the result status.
If you are executing the same test for the same serial number, instead of skipping the test as mentioned on step 3 and step 4, you may use looping to continuously run the test. Below is the step to do so.
- Follow step 1 and step 2 as above to add PreUUT sequence into the Sequences pane.
- Click on the PreUUT sequence and add If statement before the Call DoPreUUT step.
- On the If Statement, insert the Conditional Expression as below.
Parameters.UUT.UUTLoopIndex > <number of loop>
Note: If you want to loop it twice, insert as Parameters.UUT.UUTLoopIndex > 2. If you want to loop it 100 times, insert as Parameters.UUT.UUTLoopIndex > 100. - When you perform Test UUTs execution, a message dialog box will pop out to ask for serial number and the execution will continue as many times as the number of loop you have defined for Parameters.UUT.UUTLoopIndex. After Parameters.UUT.UUTLoopIndex has reached the defined number of loop, a message dialog box indicating the result will be shown.
- In your Main Sequence, select all the steps that you would like to loop for multiple times.
- Right click on the selected steps and choose for New Subsequence from Steps >> Without Preview to create a subsequence step immediately.
Note: You may select With Preview to preview the subsequence name and change it before it was created with default name. - Click on the newly created subsequence call step. On the Step Settings pane, select Looping.
Set the Loop type to Fixed number of loops. Insert the number of loop.
Note: You could also set the loop type to Custom if you have certain condition to be met before the loop stop. - Execute the test with Single Pass execution.
Additional Information
When you are using looping in TestStand, you might be facing some memory-related issue. To prevent such memory-related issue, please refer to this article: Prevent Memory Issues with TestStand Report Generation for best practices.