Format test reports
Test reports must be in JUnit XML format to appear on the Tests tab.
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 doesn't 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
For information about code coverage reports and publishing report URLs to the Artifacts tab, go to Code Coverage.
Troubleshoot test reports
Go to the CI Knowledge Base for questions and issues related to test reports in Harness CI, including:
Last updated
Was this helpful?