Change TestStand Report Location Based on Test Result

Updated Apr 2, 2026

Reported In

Software

  • TestStand 2017

Issue Details

I would like to change the location of my TestStand report based on the result status of my test sequence.

Solution

In TestStand 2012 and later:
  1. Open the Report Options dialog by navigating to Configure > Result Processing and selecting the Options for the Report.
  2. Follow steps 2 and 3 for TestStand 2010.
In TestStand 4.2 and 2010:
  1. Open the Report Options dialog by navigating to Configure > Report Options.
  2. In the Report File Pathname tab select the Specify report file path by expression option from the File Name/Directory Options dropdown.
  3. Insert \\<UUTStatus> into the report file path expression to move the reports to the folder whose name matches the UUT result status.  You can enter any custom expression of your choice, or use the predefined macros, which can be selected using the arrow icon to the right of the expression field.  The following expression is one example of sorting report files by UUT result: 
    "<ClientFileDir>\\<UUTStatus>\\<ClientFileName>_Report[<FileTime>][<FileDate>]<Unique>.<FileExtension>"
In TestStand 4.1.1 and earlier:
To do this in older versions of TestStand you can override the PreUUT and PostUUT Process Model Callbacks.  This is shown in the attached sequence file and VI.
  1. Add two statement steps to the existing PostUUT code.  The first copies the Locals.ReportFilePath Process Model variable to FileGlobals.defaultReportPath variable to be used in the next UUT loop.  The next step copies the status of the UUT into the FileGlobals.directoryToStoreReport property.
  2. Add a LabVIEW action step at the beginning of the PreUUT callback. The VI takes the two FileGlobals as input parameters, appends the status directory to the report path and moves the report from its current location into the appropriate status folder.
The attached example currently works with the "Test UUTs" entry point only, and was built in TestStand 3.5.  You could use the same 3 steps mentioned above in a combination of different callbacks to implement this behavior for the single pass or a custom entry point.

Additional Information

For more information, refer to the NI TestStand Help - Specifying Report File Paths by Expression