Example Code

Converting TestStand Deployment Utility results to JUnit

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.


  • Teststand

Code and Documents




TestStand XML reports can be converted to other formats using eXtensible Stylesheet Language Transformations (XSLT). This can be useful for importing Analyzer Warnings or Errors into a tool that is not compatible with the TestStand XML report schema.



This example takes the TSDU Detailed Status Log and converts it to a JUnit report format compatible with the Jenkins JUnit plugin. This allows users to view TSDU Errors, Warnings, and Information in Jenkins:



Note: TSDU Warnings and Errors are not user configurable. This will cause Jenkins to mark a build with any warnings build as 'Unstable'. If you would rather ignore these warnings, modify this stylesheet to remove the <xsl:if test = "@severity = 'Warn'"> tag


Hardware and Software Requirements

NI TestStand

Command Line Transformation Utility (msxsl.exe)

Steps to Implement or Execute Code

  1. Download the attached stylesheet and msxsl.exe from Microsoft.
  2. Run the TestStand Deployment Utility and save the generated XML report.
  3. Run the following command in the Windows command prompt:
    msxsl <path to analyzer report> <path to example stylesheet> -o <path to output xml file>

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