# No test results found in the configured paths. Ensure your tests output JUnit XML reports to the specified directory.

- **ID:** `cicd/circleci-no-test-results`
- **Domain:** cicd
- **Category:** test_error
- **Error Code:** `TEST_RESULTS_MISSING`
- **Verification:** ai_generated
- **Fix Rate:** 87%

## Root Cause

CircleCI's test reporting step cannot find JUnit XML files because the test framework is not configured to generate them, the output path is incorrect, or the tests haven't run yet.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| CircleCI CLI 0.1.28000 | active | — | — |
| CircleCI Server v4.1 | active | — | — |
| Jest 29.7.0 | active | — | — |
| pytest 7.4.0 | active | — | — |

## Workarounds

1. **Configure the test framework to output JUnit XML: For Jest, add `jest --ci --reporters=default --reporters=jest-junit` and set `JEST_JUNIT_OUTPUT_DIR=test-results/jest`. For pytest, use `pytest --junitxml=test-results/pytest/results.xml`.** (90% success)
   ```
   Configure the test framework to output JUnit XML: For Jest, add `jest --ci --reporters=default --reporters=jest-junit` and set `JEST_JUNIT_OUTPUT_DIR=test-results/jest`. For pytest, use `pytest --junitxml=test-results/pytest/results.xml`.
   ```
2. **Update the CircleCI config to match the actual output path: `- store_test_results: path: test-results/jest` if that's where the XML files are generated.** (85% success)
   ```
   Update the CircleCI config to match the actual output path: `- store_test_results: path: test-results/jest` if that's where the XML files are generated.
   ```
3. **Run a debug step to list files: `- run: find . -name "*.xml" -type f` to verify test results exist before store_test_results.** (75% success)
   ```
   Run a debug step to list files: `- run: find . -name "*.xml" -type f` to verify test results exist before store_test_results.
   ```

## Dead Ends

- **** — Changing the store_test_results path to a random directory without generating XML files; the step still finds nothing. (80% fail)
- **** — Disabling the store_test_results step entirely; this removes test reporting but the underlying issue (no XML generation) remains for other steps. (70% fail)
- **** — Assuming the test framework generates XML by default; many frameworks (e.g., pytest, Jest) require explicit configuration. (60% fail)
