Running Executables From NI TestStand

Updated Oct 29, 2024

Environment

Software

  • TestStand

This document will show you how you call an executable from NI TestStand.
This document will also show you how you can pass inputs into your executable and receive outputs.

Prerequisites:
  • NI TestStand is installed

In TestStand, in the Insertions Palette, there is a step type titled Call Executable. This step type can be used to run executables from TestStand by specifying the file path of the executable and entering the relevant arguments in the Step Settings, such as passing inputs or receiving outputs or configuring TestStand to not wait for the executable to complete.

  1. Go to the Insertion Palette, select the Call Executable step type and drag it into your TestStand main sequence.
insertion.PNG
  1. Select the newly added Call Executable step and go to the Call Settings tab of the step settings
step setting.PNG
  1. Configure the step to call your executable by entering the path to your executable and entering the argument expression. 
    1. The example in the image above is launching Command Prompt and performing a ping on ni.com
    2. Note that we include the character combination "\"" in between the ping command and "ni.com" to indicate that "ni.com" is an argument for the ping command itself.
  2. Use the step settings in the Wait Options tab to configure whether TestStand should launch the executable and then continue straight away, wait a set amount of time, or wait for the executable to finish execution.
    1. If waiting, you can also configure how TestStand should respond to any errors that might occur in the executable
  3. Use the Standard Input  and Standard Output tabs to configure the inputs out outputs for your executable