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.
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
- 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-resultsVerify the XML is real JUnit
- Open the produced file and confirm
<testsuite>/<testcase>elements. - Point
store_test_results.pathat the directory the reporter wrote to. - Add
when: alwaysso 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: alwaysfrom the reporter’s real output dir.