Example Code

TestStand Trace Utility

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • Teststand

Code and Documents

Attachment

Download All

Overview

 The TestStand Trace utility allows you to keep a record of TestStand steps that execute on a system, similar to NI I/O trace for NI driver calls. It provides information about the steps to help troubleshoot TestStand errors or crashes.

 

Description

When unexpected errors or crashes occur on a Test System, it is important to determine which step in the test sequence is causing the problem, and why the problem occurred. The TestStand trace tool provides a log of all steps that have executed on the system and records important information about each step, including:

 

  • Step result and error information, if present
  • Timestamp of the step
  • Sequence and sequence file containing the step
  • Module called by the step
  • Parameter information and the actual values passed for each parameter

 

The TestStand trace utility displays this information in a tree, but you can also export the log to a delimited file which you can import into excel. You can optionally configure the utility to automatically update the log after each step (useful when debugging TestStand crashes, since the utility executes within the TestStand process).

 

Hardware and Software Requirements

TestStand 2012 or Compatible

 

Steps to Implement or Execute Code

 

Installing the Utility as a Tool Menu Item

  1. Extract the TestStand Trace Utility folder in the attached archive to <TestStand Public>\Components\Tools.
  2. To add the TestStand trace utility to the TestStand tools menu, extract the TSTraceToolsEntry.ini file to <TestStand Public>\Setup\ToolMenusToInstall, then restart TestStand.

 

Using the Utility

 

  1. Navigate to Tools » TestStand Trace Utility to launch the utility.
  2. To customize the settings of the utility, navigate to File » Options. The following options are available:
    1. Log Steps with no code module - determines if steps without an associated code module are logged, such as flow control steps.
    2. Log Process Model steps - determines if steps in the process model or model files are logged.
    3. Log to disk after each step - configures the utility to automatically update the log file after each logged step. The File Path specifies the file that is updated.
  3. To use the tool, simply run sequences in TestStand as normal, and the tool will log steps as they execute.

 tstrace1.png

 

Additional Information or References

The TestStand Trace Utility does not support .NET modules at this time.  .NET steps will be logged, but will not contain module information.

 

 

Al B.
Staff Software Engineer - TestStand
CTA/CLD

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
rzabala_ues
Member
Member
on

In the description above, It says that with a version 4.0 or later of TestStand it should work. However, I have the TestStand 4.5.1.134 and I got an error (See attached image).

 

Any idea?Error.png

 

Thanks in advance and kind regards

Al.B
NI Employee (retired)
on

the code has been updated, please let me know if you are still encountering problems.  Apologies for the inconvenience.

Al B.
Staff Software Engineer - TestStand
CTA/CLD
CyGa
Active Participant Active Participant
Active Participant
on

Hi Al,

I'm running into issues when I use the tool with Parallel process model and/or steps dealing with the TS API.

Error Trace.png

I'm using TS2012.

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
ASEAN
Proven Zealot
Proven Zealot
on

Hi all,

Is this Trace Utility compatible with both 32-bit and 64-bit versions of TestStand?

Thanks,

Roberto

Applications Engineer | National Instruments
Singapore (65) 6226 5886 | Malaysia (60) 3 7948 2000 | Thailand (66) 2 298 4800
Philippines (63) 2 659 1722 | Vietnam (84) 28 3911 3150 | Indonesia (62) 21 2783 2355
ASEAN
Proven Zealot
Proven Zealot
on

Hi Al,

I tried to use this utility with TS 64-bit but I got an error saying that the DLL used is 32-bit so it is not compatible with TS 64-bit:

TS2014 64bit error with Trace Utility.png

Do you have a 64-bit version of TS-Trace.dll?

Thank you.

Applications Engineer | National Instruments
Singapore (65) 6226 5886 | Malaysia (60) 3 7948 2000 | Thailand (66) 2 298 4800
Philippines (63) 2 659 1722 | Vietnam (84) 28 3911 3150 | Indonesia (62) 21 2783 2355