{
  "id": "cicd/circleci-no-test-results",
  "signature": "No test results found in the configured paths. Ensure your tests output JUnit XML reports to the specified directory.",
  "signature_zh": "在配置的路径中未找到测试结果。请确保您的测试将 JUnit XML 报告输出到指定目录。",
  "regex": "No test results found in the configured paths",
  "domain": "cicd",
  "category": "test_error",
  "subcategory": null,
  "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.",
  "root_cause_type": "generic",
  "root_cause_zh": "CircleCI 的测试报告步骤找不到 JUnit XML 文件，因为测试框架未配置生成它们、输出路径不正确或测试尚未运行。",
  "versions": [
    {
      "version": "CircleCI CLI 0.1.28000",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "CircleCI Server v4.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Jest 29.7.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "pytest 7.4.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Changing the store_test_results path to a random directory without generating XML files; the step still finds nothing.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Disabling the store_test_results step entirely; this removes test reporting but the underlying issue (no XML generation) remains for other steps.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Assuming the test framework generates XML by default; many frameworks (e.g., pytest, Jest) require explicit configuration.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "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`.",
      "success_rate": 0.9,
      "how": "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`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "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.",
      "success_rate": 0.85,
      "how": "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.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Run a debug step to list files: `- run: find . -name \"*.xml\" -type f` to verify test results exist before store_test_results.",
      "success_rate": 0.75,
      "how": "Run a debug step to list files: `- run: find . -name \"*.xml\" -type f` to verify test results exist before store_test_results.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "配置测试框架以输出 JUnit XML：对于 Jest，添加 `jest --ci --reporters=default --reporters=jest-junit` 并设置 `JEST_JUNIT_OUTPUT_DIR=test-results/jest`。对于 pytest，使用 `pytest --junitxml=test-results/pytest/results.xml`。",
    "更新 CircleCI 配置以匹配实际输出路径：如果 XML 文件生成在 `test-results/jest` 中，则使用 `- store_test_results: path: test-results/jest`。",
    "运行调试步骤列出文件：`- run: find . -name \"*.xml\" -type f` 以在 store_test_results 之前验证测试结果是否存在。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://circleci.com/docs/collect-test-data/",
  "official_doc_section": null,
  "error_code": "TEST_RESULTS_MISSING",
  "verification_tier": "ai_generated",
  "confidence": 0.89,
  "fix_success_rate": 0.87,
  "resolvable": "true",
  "first_seen": "2023-11-02",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}