JUnit Test Report

A JUnit XML output file from a test runner.

Open in XML Formatter

About this format

CI/CD systems parse JUnit XML files to determine which tests passed or failed and to display test metrics.

Example Data

<?xml version="1.0" encoding="UTF-8"?>
<testsuites time="1.234">
  <testsuite name="ExampleTests" tests="2" failures="1" time="1.234">
    <testcase name="testSuccess" classname="ExampleTests" time="0.010" />
    <testcase name="testFailure" classname="ExampleTests" time="0.100">
      <failure message="Expected true but was false">AssertionError: Expected true</failure>
    </testcase>
  </testsuite>
</testsuites>

When to use JUnit Test Report

  • Reporting test results to CI servers
  • Aggregating test coverage metrics
  • Generating automated test dashboards