{
  "id": "java/junit-test-factory-no-parameters",
  "signature": "org.junit.jupiter.api.extension.ParameterResolutionException: No ParameterResolver registered for parameter [java.lang.String arg0] in method testFactory",
  "signature_zh": "参数解析异常：方法 testFactory 中参数 [java.lang.String arg0] 没有注册的 ParameterResolver",
  "regex": "org\\.junit\\.jupiter\\.api\\.extension\\.ParameterResolutionException:\\ No\\ ParameterResolver\\ registered\\ for\\ parameter\\ \\[java\\.lang\\.String\\ arg0\\]\\ in\\ method\\ testFactory",
  "domain": "java",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "@TestFactory method has parameters but no source, or parameters are not supported for dynamic tests.",
  "root_cause_type": "generic",
  "root_cause_zh": "@TestFactory 方法有参数但缺少来源，或动态测试不支持参数。",
  "versions": [
    {
      "version": "8+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Adding @ParameterizedTest instead of @TestFactory",
      "why_fails": "Changes test type; may not produce dynamic tests.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "Removing parameters and using hardcoded values",
      "why_fails": "Reduces test flexibility.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Remove parameters from @TestFactory method",
      "success_rate": 0.95,
      "how": "@TestFactory\nStream<DynamicTest> testFactory() {\n    return Stream.of(\"a\", \"b\").map(input ->\n        DynamicTest.dynamicTest(\"Test \" + input, () -> {\n            assertNotNull(input);\n        })\n    );\n}",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use @TestTemplate instead",
      "success_rate": 0.7,
      "how": "@TestTemplate\n@ExtendWith(MyExtension.class)\nvoid testTemplate(String input) {\n    // implementation\n}",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.83,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-06-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}