Skip to content
Latchkey

CircleCI store_test_results Empty Tests Tab - Fix JUnit Format

Test files exist at the stored path, but the CircleCI Tests tab and timing-based splitting stay empty. store_test_results only understands JUnit-style XML - any other format (or none) yields no parsed results.

What this error means

The job uploads a results directory, yet the Tests tab shows no tests and --split-by=timings falls back to filename splitting. The reports are there, but not in the JUnit XML shape CircleCI parses.

job log
store_test_results
  - path: test-results
  - 1 file found, 0 test results parsed
    (expected JUnit XML <testsuite>/<testcase> elements)

Common causes

Reporter emits a non-JUnit format

TAP, JSON, or a custom report is not parsed. The runner must be configured with a JUnit reporter (jest-junit, pytest --junitxml, go-junit-report, rspec_junit_formatter).

XML present but not valid JUnit

An XML file without proper <testsuite>/<testcase> structure parses to zero tests, so the tab stays empty even though a file was found.

Wrong path or no per-subdirectory structure

CircleCI reads JUnit XML under the stored path; pointing at the wrong directory, or a single file where the runner wrote elsewhere, parses nothing.

How to fix it

Configure a JUnit reporter and store its output

.circleci/config.yml
- run:
    name: Tests with JUnit XML
    command: |
      pytest --junitxml=test-results/junit.xml        # python
      # npx jest --reporters=default --reporters=jest-junit   # node
- store_test_results:
    path: test-results

Verify the XML is real JUnit

  1. Open the produced file and confirm <testsuite>/<testcase> elements.
  2. Point store_test_results.path at the directory the reporter wrote to.
  3. Add when: always so results upload even when tests fail.

How to prevent it

  • Always emit JUnit XML for the Tests tab and timing-based splitting.
  • Confirm the XML has valid <testsuite>/<testcase> structure.
  • Store results with when: always from the reporter’s real output dir.

Frequently asked questions

What causes "JUnit format errors"?
TAP, JSON, or a custom report is not parsed. The runner must be configured with a JUnit reporter (jest-junit, pytest --junitxml, go-junit-report, rspec_junit_formatter).
How do I fix JUnit format errors?
Configure a JUnit reporter and store its output

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card