Example Programs

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting TestStand XML Reports to JUnit

Overview

TestStand XML 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 XML report schema.

 

Description

This example takes a TestStand XML report and converts it to a JUnit report format compatible with the Jenkins JUnit plugin. This allows users to view test results in Jenkins:

 

pastedImage_10.png
 

Note: This example stylesheet only converts basic test result data into JUnit - such as Step Name, Step Status, and Error Message. 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 XML 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>
Comments
Member Sanad
Member

Hi,

I have tried to generate xml file as mentioned in "https://forums.ni.com/t5/Example-Programs/Converting-TestStand-XML-Reports-to-JUnit/ta-p/3689131?pro...", but I am not able to see this in Jenkins. Am I missing anything?

Result.png

 

Thanks,

Sanad MM

Member Sanad
Member

It was configuration issues and fixed. Not able to delete above message, please discard.

Thanks,

Sanad MM

Member KrithiSam
Member

Hey,

I am having a problem converting the TestStand XML reports into JUnit XML report.  for the command 

msxsl "C:\Users\joshikak\Downloads\outputs\Sample Test_Old_Report[19 30 48][10 06 2019].xml" "C:\Users\joshikak\Downloads\ATML_JUnit_Simple.xsl" -o C:\Users\joshikak\Downloads\output

I got an error saying

'msxsl' is not recognized as an internal or external command,
operable program or batch file.

I don't know how to proceed.

 

Thanks in advance

Active Participant WireWeaver
Active Participant

Calling msxsl directly in the command prompt will not work unless it's included in your PATH environment variable. You need to make sure that you're specifying the entire path to wherever you put the msxsl.exe, or a relative path to your working directory.

Contributors