{"id":"940aa6234ae6a0cd","repo":"junit-team/junit5","slug":"no-testengine-id-matched-the-following-include-eng","errorCode":null,"errorMessage":"No TestEngine ID matched the following include EngineFilters: ","messagePattern":"No TestEngine ID matched the following include EngineFilters: ","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/956246301e03d757539f7b76dd5a91f298637563/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineFilterer.java#L49-L85","documentation":"Thrown by EngineFilterer.checkNoUnmatchedIncludeFilter() during discovery sanity checks when an include EngineFilter names one or more engine IDs that do not match any registered TestEngine. The launcher aborts rather than silently running no engines, listing the unmatched IDs and the registered engines/filters.","triggerScenarios":"Calling LauncherDiscoveryRequestBuilder.filters(includeEngines(\"junit-jupiter\", \"spek\")) when 'spek' is not on the classpath. Or any EngineFilter with include semantics whose getEngineIds() contains an ID no registered engine provides.","commonSituations":"Adding an includeEngines filter for an engine whose dependency was removed or never added. Renaming/migrating engines (e.g. Spek, Kotest) and forgetting to update the filter. CI image missing an engine artifact that local builds include.","solutions":["Verify every engine ID in includeEngines(...) corresponds to a TestEngine on the classpath.","Remove the unmatched ID from the include filter.","Add the missing engine dependency (e.g. the Spek/Kotest launcher artifact) to the test runtime classpath.","Inspect the exception message: it lists registered TestEngines and registered EngineFilters."],"exampleFix":"// before\n.filters(includeEngines(\"junit-jupiter\", \"spek\")) // spek absent\n\n// after\n.filters(includeEngines(\"junit-jupiter\"))","handlingStrategy":"validation","validationCode":"import org.junit.platform.engine.TestEngine;\nSet<String> available = ServiceLoader.load(TestEngine.class)\n    .stream().map(p -> p.get().getId()).collect(toSet());\nfor (String id : requestedIncludeEngineIds) {\n    if (!available.contains(id)) {\n        throw new IllegalArgumentException(\"Unknown engine id: \" + id);\n    }\n}","typeGuard":"static boolean allIncludeIdsResolvable(List<EngineFilter> filters, Set<String> engineIdsOnClasspath) {\n    return filters.stream().filter(EngineFilter::isIncludeFilter)\n        .flatMap(f -> f.getEngineIds().stream())\n        .allMatch(engineIdsOnClasspath::contains);\n}","tryCatchPattern":null,"preventionTips":["Only list engine IDs in includeEngines(...) that you know are on the test runtime classpath.","Run 'gradle dependencies'/'mvn dependency:tree' to confirm engine artifacts before configuring filters.","When removing an engine dependency, update or drop the corresponding include filter."],"tags":["discovery","engine-filter","configuration","junit-platform"],"analyzedSha":"956246301e03d757539f7b76dd5a91f298637563","analyzedAt":"2026-08-04T19:25:17.049Z","schemaVersion":2}