How To End An Execution Programmatically In TestStand

Updated Jun 12, 2023

Environment

Software

  • TestStand

I am calling a subsequence as a new execution and would like to end it without having to manually end it in TestStand. How can I achieve this?

To do this, follow the following steps:
  1. At the Sequence Call step, assign the execution reference to a variables in TestStand.image.png
  2. Add a statement with the following expression Locals.ExecRef.AsExecution.Terminate(), after the Sequence Call step.

After the main sequence is run, the sub sequence is terminated as shown in the Execution pane on the left.image.png