From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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.

    Software

  • Teststand

Code and Documents

Attachment

Description

Overview

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.

 

Description

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:

pastedImage_3.png

 

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>
https://www.linkedin.com/in/trentweaver

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