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 ATML Reports to JUnit

Code and Documents

Attachment

Overview

TestStand ATML reports can be converted to other formats using eXtensible Stylesheet Language Transformations (XSLT). This can be useful for importing Test Results into a tool that is not compatible with the TestStand ATML Test Result schema.

Description

 This example takes an ATML 6.0.1 report and converts it to a JUnit report format compatible with the Jenkins JUnit plugin. This allows users to view step results in Jenkins:

Note: This example stylesheet only converts basic test result data into JUnit - such as Step Name and Step Status. This stylesheet can be modified to include additional failure information for specific step types.

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. Generate a TestStand ATML Report using the report plugin.
  3. Run the following command in the Windows command prompt:
    msxsl <path to test 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.

Contributors