Example Programs

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing Custom Command Line Arguments to a TestStand Operator Interface (LabVIEW)

Overview

The TestStand Application Manager supports processing custom command line arguments through the ProcessUserCommandLineArguments event. This can prove useful when automating test execution from a CI server.

Description

 

 This example is similar to the LabVIEW Basic User Interface, but has been modified to accept the following command line arguments:

Option Purpose
/SimulateFailure <failures> When used with the included example sequence file, this suppresses the simulation dialog and instead simulate failures as specified. This argument accepts the following parameters:
  • Keyboard
  • Video
  • Power
  • CPU
  • ROM
  • RAM
If no parameters are specified, then all components are simulated to pass.

 

This example demonstrates the following concepts:

  • Using ProcessUserCommandLineArgumentsEvent to handle custom command line arguments.
    Spoiler
    ProcessUserCommandLineArgs.png
  • Use of the ApplicationMgr.AddCommandLineArgumentsHelp function to add custom command line arguments help.
    Spoiler
    AddCmdHelp.png
  • Creating a custom UI Message handler to pass command line arguments to sequence execution.
    Spoiler
    UIMsg.png

Note: This example does not pass errors back to the command line, so it may generate popups that require user action.

Hardware and Software Requirements

TestStand 2014 SP1 or higher 

LabVIEW 2015 SP1 or higher

Steps to Implement or Execute Code

 

  1.  Unzip the attached code and build the TestExec.exe build spec from the Basic User Interface project.
  2. Open a command line window in the Build directory (Shift + right click » Open command window here)
  3. In order to see the Command Line help, run:

    TestExec /?

  4. Experiment with the /SimulateFailure argument. For example:

    TestExec /runEntryPoint "Single Pass" "<ExampleDir>\TestSequence\Computer Motherboard Test Sequence.seq" /SimulateFailure Keyboard Video RAM /quit

Contributors