Loading and Running Sequences
- Updated2025-07-23
- 12 minute(s) read
The TestStand Sequence Editor includes menus, toolbars, windows, and panes you use to load workspace files and edit and run sequence files. Click Help»Help Topic to launch the NI TestStand Help for specific information about the active window, tab, or pane in the sequence editor.
Starting TestStand
Menu Bar
By default, the menu bar contains the File, Edit, View, Execute, Debug, Configure, Source Control, Tools, Window, and Help menus. The menus are fully customizable. You can create menus with any sequence editor commands you want. Browse the menus in the sequence editor to familiarize yourself with the contents of each menu.
Toolbars
By default, the sequence editor contains a toolbar with shortcuts to commonly used selections from the menu bar. The toolbar is fully customizable. You can create toolbars with buttons for any environment commands you want.
Windows and Panes
The sequence editor contains tabbed windows and panes you can float, dock, resize, and hide. You can customize the pane and tab layout to optimize development and debugging tasks. You can reset the user interface configuration state of the panes in the sequence editor by selecting View»Reset UI Configuration, which resets to a default configuration all modifications previously made to menus, toolbars, and the docking state of panes.
The Insertion Palette pane in the TestStand Sequence Editor displays items you can insert into a sequence file. The pane contains a Step Types list and a Templates list. The Step Types list displays the step type menu, and the Templates list displays user-defined template sequences, steps, and variables.
Status Bar
The status bar displays the following information for the sequence editor:
- User name of the current user.
- The environment in which the application is running.
- Name of the process model file the current sequence uses. You can double-click in this area to open that process model file.
- Number of steps you have selected.
- Total number of steps in the active sequence.
- File path of the active report after execution.
Organizing a TestStand System with Workspace and Project Files
Create a workspace to organize and access development files. Use workspaces early in development so you can easily keep track of files while you are developing. A workspace file (.tsw) contains references to any number of TestStand project files. A project file (.tpj) contains references to any number of other files of any type.
Use project files to organize related files and directories of files in the test system. You can insert any number of files into a project. For example, you can use a project file to organize a sequence file, code module source files, and other supporting files.
A workspace file opens on the Workspace pane, which displays the content of a workspace file. To open any file from the Workspace pane, double-click the file. To organize the files, use the options in the Edit menu to cut, copy, paste, and delete files in projects or project files in the workspace. You can also drag and drop files on the Workspace pane.
You can open only one workspace file at a time. If you have a workspace file open and you try to open or create another, TestStand prompts you to save the workspace file before opening or creating another file.
You must use workspace files to use the source code control (SCC) system features in TestStand. You can also use workspace files to deploy test systems with the TestStand Deployment Utility.
Loading a Workspace File
Complete the following steps to load and view a workspace file.
- Select File»Open File and navigate to the <TestStand Public>\Tutorial directory.
- Select Tutorial.tsw and click Open.
- Expand the Using TestStand project, which contains all the sequence files used in the tutorials in this tutorial, including the Solution directory.
You can leave the workspace file open on the Workspace pane so you can directly open the sequence files for the tutorials in this tutorial, or you can close the Workspace pane and use the options in the File menu to open the sequence files. If you want to close the Workspace pane, select File»Close Workspace File and click No if TestStand prompts you to save the changes.
Creating Test Sequences and Sequence Files
A sequence consists of a series of steps. A step can perform many actions, such as initializing an instrument, performing a complex test, or controlling the flow of execution in a sequence.
A sequence file can contain one or more sequences. Sequence files can also contain global variables, which all sequences in the sequence file can access.The sequence editor color-codes sequences by type, such as Execution entry points, Configuration entry points, process model callback sequences, subsequences, and engine callbacks.
The Setup, Main, and Cleanup groups of the Steps pane display a list of the steps in the step group.TestStand executes the steps in the Setup step group first, the Main step group second, and the Cleanup step group last. The Setup step group typically contains steps that initialize instruments, fixtures, or a UUT. The Main step group typically contains the bulk of the steps in a sequence, including the steps that test the UUT. The Cleanup step group typically contains steps that power down or restore the initial state of instruments, fixtures, and the UUT.
A sequence can have any number of parameters and local variables. Use parameters to pass data to a sequence when you call the sequence as a subsequence. Use local variables for storing data relevant to the execution of the sequence, storing any other data needed only in the current sequence, maintaining counts, or holding intermediate values.
In the sequence editor, the Variables pane displays all the variables and properties the selected sequence has access to at run time. When you execute a sequence, the Variables pane displays the sequence context for the sequence currently selected on the Call Stack pane. The sequence context contains all the variables and properties accessible in the current execution. Use the Variables pane to examine and modify the values of these variables and properties when an execution is suspended.
The sequence editor opens each sequence file in a separate Sequence File window, which includes the Sequences pane, the Steps pane, and the Variables pane. The Sequences pane lists the name, comment, and requirements values for all sequences in the sequence file. Use the Sequences pane to select the active sequence to display on the Steps pane, to insert new sequences, and to delete existing sequences from a sequence file.
Loading a Sequence File
Complete the following steps to load and view a sequence file.
- Select File»Open File and navigate to the <TestStand Public>\Tutorial directory.
- Select Computer.seq and click Open. The Computer.seq sequence file is a simulated test of a computer in which you can designate various hardware components to fail. The sequence runs tests implemented as functions in a DLL. TestStand includes examples of DLLs written in LabVIEW, .NET, and LabWindows/CVI. Note If you left the Tutorial.tsw workspace file open from the Loading a Workspace File section of this tutorial, you can open Computer.seq from the Workspace pane by double-clicking Computer.seq in the list of files.
- Select MainSequence on the Sequences pane.
- Browse the contents of each pane in the Sequence File window. Ensure that the Sequences pane and the Steps pane are visible when you finish.
Executing a Sequence
You can execute a sequence directly or execute a sequence using a process model Execution entry point. The process model entry point sequence contains a series of steps that specify the high-level flow of an execution.
The TestStand Sequence Editor launches a separate Execution window for each execution you start using the Execute menu. Use the Execution window to view, or trace, steps as they execute, to monitor the values of variables and properties, and to examine test reports when the execution completes.
In Trace Mode, the Execution window shows the steps in the currently executing sequence and indicates the currently executing step. If the execution suspends, the Execution window shows the next step to execute and provides debugging options.
Before the execution begins, by default, the TestStand Sequence Analyzer analyzes the active sequence file and detects the most common situations that can cause run-time failures. The sequence analyzer prompts you to resolve the reported errors before you execute the sequence file. Carefully review any errors the sequence analyzer returns to prevent run-time failures. If you want to disable the sequence analyzer, click Debug»Sequence Analyzer»Toggle Analyze File Before Executing.
Executing a Sequence Directly
Complete the following steps to run MainSequence in the Computer.seq sequence file directly.
- Select Configure»Station Options to launch the Station Options dialog box. The Execution tab contains options for configuring how an execution behaves. By default, the Enable Tracing option is enabled to specify that the sequence editor displays the progress of an execution with a yellow arrow icon that appears to the left of the currently executing step. This icon is called the execution pointer. The Execution tab also contains a Speed slider control that specifies the tracing speed of the execution. Use this option to slow down the tracing speed so you can observe each step as it executes. By default, the tracing speed is set to fast.
- Adjust the Speed slider control to slow. Click OK to close the Station Options dialog box.
- Select Execute»Run MainSequence. The sequence editor opens an Execution window to show the sequence as it executes. The first step in the Setup step group of MainSequence launches the Test Simulator dialog box. The Test Simulator dialog box prompts you to designate the computer component, if any, you want to fail during the execution.
- Enable the RAM test option.
- Click Done.
- Observe the Execution window as it traces through the steps TestStand runs. After the execution completes, the Execution window dims, and the Status column of the RAM test contains the value Failed. Note If the tracing speed is too slow or fast, adjust the Speed slider control on the Execution tab of the Station Options dialog box.
- Right-click the Execution window tab and select Close from the context menu to close the Execution window.
Executing a Sequence Using the Sequential Process Model
In addition to executing sequences directly, you can execute sequences using an Execution entry point, which is a sequence in a process model file that invokes a test sequence file, typically by calling the MainSequence callback in the client sequence file. Executing an Execution entry point performs a series of operations before and after calling MainSequence of the sequence file. Common operations of the process model include identifying the UUT, notifying the operator of pass/fail status, logging results, and generating reports.
The Sequential process model includes the following Execution entry points:
- Test UUTs Execution Entry Point—The Test UUTs Execution entry point initiates a loop that repeatedly identifies and tests UUTs.
- Single Pass Execution Entry Point—The Single Pass Execution entry point tests a single UUT without identifying it. Use the Single Pass Execution entry point when you want to debug tests or determine whether the sequence execution proceeds as you intended.
Complete the following steps to run MainSequence in the Computer.seq sequence file using the Test UUTs Execution entry point of the Sequential model.
- Launch the Station Options dialog box.
- Click the Model tab, verify that SequentialModel.seq is selected from the Station Model ring control to select the Sequential model as the default process model, and click OK.
- Select Execute»Test UUTs. Before executing the steps in MainSequence, the process model sequence launches a UUT Information dialog box that prompts you for a serial number.
- Enter any serial number and click OK.
- Use the options in the Test Simulator dialog box to select any test other than the Video or CPU tests to fail. You can also allow all the tests of the UUT to pass.
- Click Done. Observe the Execution window as the sequence executes. After completing the steps in MainSequence, the process model displays a banner that indicates the result of the UUT.
- Click OK to close the UUT Result banner. TestStand generates a report, but does not display the report until you finish testing all the UUTs. TestStand launches the UUT Information dialog box again.
- Repeat steps 4 through 7 using several different serial numbers.
- Click Stop in the UUT Information dialog box to stop the loop and complete the execution. After the execution completes, TestStand displays the report on the Report pane of the Execution window for all the tested UUTs.
- Review the test report, which includes the results for each UUT, and select Window»Close All Windows to close all the windows in the sequence editor.
Executing a Sequence Using the Batch Process Model
Use the Batch model to control a set of test sockets that test multiple UUTs as a group. For example, if you have a set of circuit boards attached to a common carrier, use the Batch model to ensure that you start and finish testing all boards at the same time. With the synchronization features of the Batch model, you can direct a step that applies to the batch as a whole to run only once per batch instead of once for each UUT. You can also specify whether certain steps or groups of steps cannot run on more than one UUT at a time or whether certain steps must run on all UUTs at the same time. The Batch model generates batch reports that summarize the test results for the UUTs in the batch.
Complete the following steps to run the BatchUUT.seq sequence file using the Test UUTs Execution entry point of the Batch model.
- Open <TestStand Public>\Tutorial\BatchUUT.seq and examine
the steps and comments in the sequence file to familiarize yourself with the
functionality of the sequence. Note You do not need to change the default process model in the sequence editor for this tutorial. The BatchUUT.seq sequence file always uses the Batch model, regardless of the default process model of the sequence editor. Use the Advanced tab of the Sequence File Properties dialog box to specify the process model a sequence file uses.
- Select Configure»Model Options to launch the Model Options dialog box.
- In the Multiple UUT Settings section, change Number of Test Sockets to 2 and enable the Tile Execution Windows option. The Number of Test Sockets control specifies the number of UUTs to test in the batch.
- In the Batch Settings section, select Don't Synchronize from the Default Batch Synchronization ring control and click OK.
- Select Execute»Test UUTs. Before executing the steps in MainSequence, the process model sequence launches the UUT Information dialog box for the Batch model, which prompts you for a batch serial number and UUT serial numbers for each test socket. You can also disable test sockets in the UUT Information dialog box.
- Enter any batch serial number and UUT serial numbers. Click Go. Review the information in the Batch Model Example dialog box, then click OK. TestStand launches several different front panels to indicate the progress of the executions. Click OK to continue. After completing the steps in MainSequence, the process model launches the Batch Results dialog box, which displays a banner that indicates the result of the UUTs. You can view the batch report and individual UUT reports or start the next batch.
- Click the View Batch Report button. From the pop-up list, you can select Entire File to show all tested batches or Current Only to show the most recently tested batch.
- Select Current Only from the pop-up list. TestStand
launches the default application associated with the file extension of the
report, such as Internet Explorer for Automatic Test Markup Language (ATML),
XML, and HTML reports and Microsoft Notepad for text reports. Note Enable Internet Explorer to run scripts if the browser launches a prompt. To use another application as an external report viewer, select Configure»External Viewers and follow the instructions in the Configure External Viewers dialog box. Refer to the Using External Report Viewers section of Customizing Reports, for more information about using external viewers.
- Close Internet Explorer and click Next Batch in the Batch Results dialog box.
- Repeat steps 6 through 9 for several different batches.
- Click Stop in the UUT Information dialog box to complete the execution. After the execution completes, TestStand displays test reports on the Report pane of the Execution window for all batches and UUTs.
- Examine the reports that include results for each batch and UUT.
- Close all the windows in the sequence editor.