This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

Run a Sequence File from Windows Explorer or Command Line

Updated May 9, 2023

Environment

Software

  • TestStand

To run a sequence file, normally I have to start the TestStand Sequence Editor application, open the sequence file, then execute the entry point. I would like to simply double-click a sequence file in Windows Explorer to launch TestStand and execute an entry point automatically in one step.

The TestStand Sequence Editor and LabVIEW, LabWindows/CVI, Visual Basic, C# and C++ Operator Interfaces now supports command line options to run sequences. Listed below are examples showing how to run a particular sequence in a sequence file, and how to run an execution entry point, such as Test UUTs. For the examples below we assume that you want to run the sequence file with one of the operator interfaces listed above. If you want to run the sequence file with the TestStand Sequence Editor replace "testexec.exe" with "SeqEdit.exe".

Run MainSequence in the ASequenceFileToRun sequence file:
testexec.exe -run MainSequence c:\sequenceFiles\ASequenceFileToRun.seq

Run the ASequenceFileToRun sequence file with the Test UUs execution entry point:
testexec.exe -runEntryPoint "Test UUTs" c:\sequenceFiles\ASequenceFileToRun.seq

Load multiple sequence files:
testexec.exe c:\sequencefiles\ASequenceFileToOpen.seq c:\sequencefiles\AnotherSequenceFileToOpen.seq

To make a sequence file (e.g., Power Test.seq) execute specific entry point (e.g., Single Pass) simply by double-clicking it (e.g., from Windows Explorer or Desktop), perform the following steps:
  1. It's not recommended to put the sequence file under shared folder (e.g., One Drive).
    • Sometimes it will return Error -18001, suspect TestStand don't have enough access into the shared folder.
    • Alternative solution is the sequence file can be located under C:\.
      • 1.png
  2. Find the TestExec.exe
    • TestExec.exe is under TestStand shipping example <TestStand>\UserInterfaces\Full-Featured\<Programming Language>\SourceCode.
    • This shipping example provides several programming languages.
    • In this article, LabVIEW is selected as user interface.
      • 2.png
      • 3.png
  3. Create a shortcut for the sequence file, i.e., right-click on the sequence file and select Create Shortcut from the pop-up menu.
  4. Right-click on the newly created shortcut and select Properties from the pop-up menu.
  5. Select the Shortcut tab in the Properties window that appears.
  6. In the Target field enter:
    "<testexec.exe address>" /useExisting -runEntryPoint "<Entry Point>" "<Sequences file address>"

    For example, 

    "C:\Program Files (x86)\National Instruments\TestStand 2021\UserInterfaces\Full-Featured\LabVIEW\Source Code\TestExec.exe" /useExisting -runEntryPoint "Single Pass" "C:\Teststand program\Power Test.seq"
    
    4.png
    
  7. Click the Apply button and then click the OK button to close the Properties window.

Here's the result after double click Power Test.seq shortcut. TestStand will direct execute Single Pass and return test sequence result.

5.png

 

Next Steps

For all the examples above, we assume that your operating system is configured to recognize relative paths to this executable. If you do not get good behavior from running testexec.exe from the command line, you may want to try an absolute path to your executable. Remember that if your paths have any spaces in them, you will be required to add "..." around your paths for the command line to interpret them correctly.

To see a list of all available commands in the Command Line for TestStand, type:
"C:\Program Files (x86)\National Instruments\TestStand 2017\Bin\SeqEdit" -?

You should see a dialog like below: