{"record":{"id":"1615f25734bcb47a","repo":"junit-team/junit5","slug":"no-testengine-id-matched-the-following-include-eng","errorCode":null,"errorMessage":"No TestEngine ID matched the following include EngineFilters: %s.\\nPlease fix/remove the filter or add the engine.\\n%s","messagePattern":"No TestEngine ID matched the following include EngineFilters: (.+?)\\.\\\\nPlease fix/remove the filter or add the engine\\.\\\\n(.+?)","errorType":"exception","errorClass":"JUnitException","httpStatus":null,"severity":"error","filePath":"junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineFilterer.java","lineNumber":67,"sourceCode":"\t\tcheckedTestEngines.put(testEngine, excluded);\n\t\treturn excluded;\n\t}\n\n\tvoid performSanityChecks() {\n\t\tcheckNoUnmatchedIncludeFilter();\n\t\twarnIfAllEnginesExcluded();\n\t}\n\n\tprivate void warnIfAllEnginesExcluded() {\n\t\tif (!checkedTestEngines.isEmpty() && checkedTestEngines.values().stream().allMatch(excluded -> excluded)) {\n\t\t\tlogger.warn(() -> \"All TestEngines were excluded by EngineFilters.\\n\" + getStateDescription());\n\t\t}\n\t}\n\n\tprivate void checkNoUnmatchedIncludeFilter() {\n\t\tSortedSet<String> unmatchedEngineIdsOfIncludeFilters = getUnmatchedEngineIdsOfIncludeFilters();\n\t\tif (!unmatchedEngineIdsOfIncludeFilters.isEmpty()) {\n\t\t\tthrow new JUnitException(\"No TestEngine ID matched the following include EngineFilters: \"\n\t\t\t\t\t+ unmatchedEngineIdsOfIncludeFilters + \".\\n\" //\n\t\t\t\t\t+ \"Please fix/remove the filter or add the engine.\\n\" //\n\t\t\t\t\t+ getStateDescription());\n\t\t}\n\t}\n\n\tprivate SortedSet<String> getUnmatchedEngineIdsOfIncludeFilters() {\n\t\tSet<String> checkedTestEngineIds = checkedTestEngines.keySet().stream() //\n\t\t\t\t.map(TestEngine::getId) //\n\t\t\t\t.collect(toSet());\n\t\treturn engineFilters.stream() //\n\t\t\t\t.filter(EngineFilter::isIncludeFilter) //\n\t\t\t\t.map(EngineFilter::getEngineIds) //\n\t\t\t\t.flatMap(Collection::stream) //\n\t\t\t\t.filter(id -> !checkedTestEngineIds.contains(id)) //\n\t\t\t\t.collect(toCollection(TreeSet::new));\n\t}\n","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/junit-team/junit5/blob/f070c699a08b5d8393df9afd147af5c5e90bb21b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineFilterer.java#L49-L85","documentation":"EngineFilterer.checkNoUnmatchedIncludeFilter runs after all engines are checked: if any include EngineFilter named an engine id that no registered TestEngine provided, it throws a JUnitException listing the unmatched ids plus a state description. This prevents silently running zero tests because of a typo'd engine id.","triggerScenarios":"Adding an include EngineFilter (LauncherDiscoveryRequestBuilder.filters(includeEngines(\"xxx\"))) where 'xxx' is not the id of any TestEngine on the classpath/registry. Also via the junit.platform.launcher.includeEngines system/launcher property pointing at a non-existent engine.","commonSituations":"Typo in engine id (e.g. 'jupiter' instead of 'junit-jupiter'); the requested engine is not on the classpath (missing junit-jupiter-engine dependency); using includeEngines on a minimal classpath that only has platform; an engine was excluded by another filter so its id never matches.","solutions":["Read the message: it lists unmatched ids and the actually-available engine ids - correct the typo or add the dependency.","Ensure the engine artifact is on the classpath (e.g. add org.junit.jupiter:junit-jupiter-engine).","Remove the includeEngines filter if you want all available engines, or align include/exclude filters so the included engine is not also excluded."],"exampleFix":"// before\nrequest().filters(includeEngines(\"jupiter\")).build(); // typo -> throws\n// after\nrequest().filters(includeEngines(\"junit-jupiter\")).build();","handlingStrategy":"validation","validationCode":"// Verify engine ids exist before applying include filters\nSet<String> available = testEngines.stream().map(TestEngine::getId).collect(toSet());\nfor (String id : requestedIncludeIds) {\n    if (!available.contains(id)) throw new IllegalArgumentException(\"unknown engine id: \" + id);\n}","typeGuard":"static boolean engineIdKnown(Iterable<TestEngine> engines, String id) {\n    for (TestEngine e : engines) if (e.getId().equals(id)) return true;\n    return false;\n}","tryCatchPattern":"try {\n    launcher.execute(request);\n} catch (JUnitException e) {\n    if (e.getMessage().contains(\"No TestEngine ID matched\")) {\n        // read available ids from message, fix filter, retry\n    }\n}","preventionTips":["Use exact engine ids: junit-jupiter, junit-vintage, junit-platform-suite.","Ensure engine artifacts are on the classpath before filtering by id.","Avoid include/exclude combinations that fully exclude the included engine."],"tags":["engine-filter","include-engines","discovery","classpath"],"backgroundTag":null,"analyzedSha":"f070c699a08b5d8393df9afd147af5c5e90bb21b","analyzedAt":"2026-08-11T20:31:00.530Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}