Jump to Specific Step in a Different Sequence File Using PostStep Callback

Updated Jun 5, 2023



  • TestStand

In the TestStand Sequence Editor, using the "Goto" post actions within the PostStep callback only allows the sequence to goto a specific step within the same sequence file. However, by adding the "NextStepIndex" property as a statement after a specific case, one can jump out of the PostStep callback sequence, as well as the subsequence, all the way back up to the main sequence, allowing TestStand to skip over unnecessary steps. 

  1. Figure out which case you would like to add the "goto" statement within the PostStep callback sequence.
  2. Obtain the step index and level of sequence that you want to jump to.
  3. Add a "Statement" step to the case with the following expression: RunState.<subproperty depending on sequence level>.RunState.NextStepIndex=<index of step you would like to jump to>

Following image is an example statement that exits out of both the PostStep callback and the subsequence that caused the runtime error, taking it to the main sequence's step of index 3. 

By following the above steps, you can exit out of certain subsequences and go to specific steps in different sequence files when a specific condition is met.