Format test reports
Harness CI supports JUnit XML and TRX test report formats.
What you will learn from this topic
What test report formats Harness CI supports
How to configure JUnit XML output for common test tools
What JUnit converters and formatters are available for languages without built-in JUnit XML support
Before you begin
Harness account: You need a Harness account with CI module access.
Run or Test step: Your pipeline needs a Run or Test step configured to run tests and specify report paths.
Results on the Tests tab are parsed from test reports specified in the Report Paths setting in Run and Test steps.
Supported test report formats
Harness supports the following test report formats:
JUnit XML - The standard format for test reports. Most testing frameworks either produce JUnit XML by default or have plugins to generate it. Go to JUnit XML format resources for specification details.
TRX - .NET test reports (
.trxfiles) are automatically converted to JUnit XML format. When using .NET, enable log reporting when running tests (for example,dotnet test -l:trx) to generate TRX reports.
If your test tool does not produce JUnit XML or TRX by default, go to JUnit converters, formatters, and plugins for conversion tools.
For optimal rendering in the Harness UI, there is a limit of 8,000 characters per field. If a field in your XML file contains more than 8,000 characters, the output might render incorrectly on the Tests tab.
JUnit XML format resources
Use these resources to learn about JUnit XML formatting.
Tools with built-in jUnit XML output
Here are some Harness YAML examples for test tools that produce JUnit XML output by default.
C, C++
Java - Gradle
PHP
Python
For Python, use pytest or unittest. You can also use pytest to run unittest.
Ruby - Cucumber
JUnit converters, formatters, and plugins
If your test tool does not automatically produce test results in JUnit XML format, there are JUnit converters, formatters, and plugins available for all major languages. Some examples of conversion tools and corresponding Harness YAML are provided below.
C# - .NET Core, NUnit
Clojure
Go
Java - Maven
JavaScript
Ruby - Minitest, RSpec
Code coverage reports and test report artifacts
Go to Code Coverage for code coverage reports and publishing report URLs to the Artifacts tab.
Troubleshooting
Next steps
Go to View test results to review test results on the Tests tab.
Go to Split tests in Run steps to use parallelism for test splitting.
Last updated
Was this helpful?