Creating Subsequences in TestStand

Updated Feb 2, 2026

Environment

Software

  • TestStand

TestStand allows you to organize test logic into separate sequences to improve modularity, readability, and reuse. A well‑structured sequence file typically contains multiple sequences—for example, a MainSequence, several subsequences, and callback sequences.

This article explains the two primary ways to create new sequences:

 

  1. Creating a new empty subsequence from the Sequence pane
  2. Creating a subsequence automatically from selected steps

 

Creating a New Sequence Manually

You can create a new blank sequence at any time using the Sequence pane.

 

To create a new sequence:

 

  1. Open the Sequence File where you want to add the sequence.
  2. In the Sequences pane, right‑click in an empty area or on an existing sequence.
  3. Select New Sequence.
  4. Enter a name for the new sequence.

The new sequence appears immediately in the Sequences pane, ready for you to add steps, variables, parameters, and comments.

New sequence added to the sequences pane.

Use this method when:

 

  • You are building a new sequence from scratch.
  • You already know the structure and steps you want to add.
  • The sequence is conceptually separate and not derived from existing logic.

This method is the most flexible and is commonly used for creating initialization, utility, or custom test sequences.

 

Creating a Sequence from Selected Steps

TestStand can automatically extract selected steps into a new subsequence, analyzing dependencies and generating parameters for you. This is useful for refactoring long sequences, improving readability, or creating reusable logic

 

To create a subsequence from selected steps:

 

  1. Select a block of steps in a sequence.
  2. Right-Click any of the selected steps and select New Subsequence from Steps >> With Preview or New Subsequences From Steps >> Without Preview.

     

    New Subsequence from Steps shortcut menu

     

  3. TestStand analyzes the selected steps to determine:
    • required inputs,
    • required outputs,
    • and the Potential Parameters needed.
  4. If With Preview was selected on step 2, before creating the subsequence, the New Subsequence from Selected Steps dialog appears, allowing you to edit the following settings:
    • New sequence name
    • Location of the new Subsequence
    • Local variables in the parent sequence that can be removed because their scope will move into the subsequence.
    • Potential parameters to be created.

       

      New Subsequence From Selected Steps dialog.

       

  5. TestStand replaces the selected steps with a Sequence Call step pointing to the newly created subsequence.

     

    New subsequence replacing the selected steps

     

  6. The new subsequence appears in the Sequences pane, containing:

    • The extracted steps
    • Automatically created parameters for any data dependencies
    • Any variables whose scope now belongs inside the subsequence

 

This feature helps you:

 

  • Break up long sequences into readable subsequences
  • Automatically detect and create required parameters
  • Improve maintainability and modularity
  • Refactor complex legacy logic with minimal manual work

It is especially helpful for users who want to quickly reorganize existing sequences without needing to manually inspect variable usage.