01What is JUnit XML Viewer?
CI jobs from Jest, pytest, Maven Surefire, Go test wrappers and many other runners can write their results as JUnit XML. The file is easy for machines to read and tiring for people to scan. When a pipeline goes red, you usually want one thing: which tests broke and why. This viewer turns the report into that short answer. Paste a report whose root is either <testsuites> or a single <testsuite>. Any other root, such as <report>, gets a clear error. The tool parses the text with the browser's own DOMParser, so malformed XML gives an inline parse error instead of a wrong answer. Each <testcase> is then sorted into one of four states. Following the common JUnit XML convention, a test case counts as passed unless it contains a result element: <failure>, <error> or <skipped>. If a case somehow holds more than one, failure wins over error, and error wins over skipped. You get totals at the top, then one panel per suite with its passed, failed, error and skipped counts and the summed case time. Nested suites are kept and shown with their parent path, such as Auth > Login. For every failed or errored case you see the type and message attributes. The element's text, which usually holds the stack trace, sits in a collapsible block. A checkbox hides passing tests so you can focus on what broke, and Copy produces a plain text summary for a ticket or chat message. Here is how that plays out on the pytest example. Its suite attributes claim one failure and two skips. The viewer reports 5 tests: 1 passed, 2 failed, 1 errors, 1 skipped, in 1.912s. The difference is test_retry, which holds both a <skipped> and a <failure> element, so the failure takes priority. That example also shows why the counts are worked out from the test cases themselves. The tests, failures and errors attributes on suites are ignored, because some tools leave them out or fill them in differently. Limits: properties, system-out and system-err are not shown. Times come from each case's time attribute, so setup time a runner logs only at suite level is not included. JUnit XML has no single official standard, so unusual dialects may need a look at the raw file. Everything runs in your browser; the report is never uploaded.
Developers and QA engineers reading CI test results, and people setting up test reporters who want to check the output. The tool runs entirely in your browser, so your data never leaves your device.
02How to use JUnit XML Viewer
- Open the JUnit XML file your test runner or CI job produced and copy its contents
- Paste it into the input box, or load one of the examples
- Read the totals, then the per-suite panels below them
- Tick Only failures and errors to hide passing tests
- Expand Stack trace / details under a failed case to see the full text
- Use Copy summary to grab a plain text version of the results
03Worked examples
- Input:
Mixed results example: suite math (adds, divides with <failure message="expected 2 but got 3">, todo with <skipped>) and suite io (reads file with <error message="ENOENT">) - Result:
Total 4: 1 passed, 1 failed, 1 errors, 1 skipped (0.6s) math: 1 passed, 1 failed, 0 errors, 1 skipped FAILED divides: expected 2 but got 3 io: 0 passed, 0 failed, 1 errors, 0 skipped ERROR reads file: ENOENT - Input:
<testsuite name="Auth"><testsuite name="Login"><testcase name="ok" time="1"/><testcase name="bad" time="2"><failure message="boom"/></testcase></testsuite><testcase name="top" time="0.5"/></testsuite> - Result:
Total 3: 2 passed, 1 failed, 0 errors, 0 skipped (3.5s) Auth: 1 passed, 0 failed, 0 errors, 0 skipped Auth > Login: 1 passed, 1 failed, 0 errors, 0 skipped FAILED bad: boom - Nested suites are shown with their parent path.
- Input:
<testsuites><testsuite name="api" tests="2"><testcase classname="api.Users" name="lists users" time="0.05"/><testcase classname="api.Users" name="creates user" time="0.08"/></testsuite></testsuites> - Result:
Total 2: 2 passed, 0 failed, 0 errors, 0 skipped (0.13s) api: 2 passed, 0 failed, 0 errors, 0 skipped - Input:
pytest example: suite attributes say failures="1" skipped="2"; test_retry holds both <skipped> and <failure message="TimeoutError"> - Result:
Total 5: 1 passed, 2 failed, 1 errors, 1 skipped (1.912s) pytest: 1 passed, 2 failed, 1 errors, 1 skipped FAILED test_refund_total: AssertionError: assert 1999 == 2000 ERROR test_migrate: failed on setup with ConnectionRefusedError FAILED test_retry: TimeoutError - Counts come from the test cases, and failure wins over skipped.
- Input:
<report><testcase name="x"/></report> - Result:
Root element is <report>, expected <testsuites> or <testsuite>.
04Common use cases
- Reading a CI job's junit.xml artifact without downloading a separate report tool
- Finding which test in a long run failed and copying its stack trace
- Checking that a test runner's JUnit reporter writes failures and skips the way you expect
- Pasting a short pass and fail summary into a pull request or bug ticket
- Comparing suite-level results when a run has nested test suites
- Spotting a suite whose failures attribute disagrees with the test cases it actually contains
05Tips
- If you see a parse error, check that the whole file was copied, including the closing </testsuites> tag
- A suite whose counts differ from its tests or failures attributes usually means the reporter wrote those attributes differently; the case list is the source of truth here
- Skipped tests show their message attribute, which often explains why the test did not run
- Large reports work, but trimming to the failing suites makes the copied summary easier to share
- An error usually means setup or a fixture broke before any assertion ran, so look at the environment first
06Related concepts
JUnit XML, test report, testsuite, testcase, stack trace, continuous integration.
Frequently Asked Questions
What is JUnit XML Viewer?
JUnit XML Viewer is a free, browser-based developer tool on AIDToolStack. Paste a JUnit XML test report and see passed, failed, errored and skipped tests per suite, with failure messages and stack traces. Runs in your browser. It requires no installation or sign-up and works entirely in your browser.
Is JUnit XML Viewer free to use?
Yes. No sign-up, no fees and no usage cap.
Does JUnit XML Viewer store my data?
No. It runs in your browser; nothing is uploaded.