Problem
JUnit 6.0.0 shipped with unified versioning — all artifacts (Platform, Jupiter, Vintage) now share the same 6.0.x version number. What was previously junit-platform-engine:1.10.x is now junit-platform-engine:6.0.x.
Spring Boot 4.0.5 ships JUnit Platform 6.0.3 by default. Projects on Spring Boot 4 cannot use the pitest-junit5-plugin because the plugin's coverage analysis phase finds 0% coverage and runs 0 tests per mutation.
Reproduction
Environment:
- JDK 25 (Temurin 25.0.2+10)
- Gradle 8.14
- Spring Boot 4.0.5
junit-platform-engine:6.0.3 (managed by Spring Boot BOM)
gradle-pitest-plugin:1.15.0 (1.19.0 corrupts the test classpath — see below)
pitest:1.22.1 (for JDK 25 / ASM 9.8+ support)
pitest-junit5-plugin:1.2.1 and 1.2.2 (both tested)
Config (Gradle Kotlin DSL):
pitest {
pitestVersion.set("1.22.1")
junit5PluginVersion.set("1.2.2")
targetClasses.set(setOf("com.example.*"))
mutationThreshold.set(60)
}
Result:
8:41:22 PIT >> INFO : Sending 362 test classes to minion
>> Line Coverage (for mutated classes only): 0/3298 (0%)
>> Generated 1132 mutations Killed 0 (0%)
>> Mutations with no coverage 1132. Test strength 100%
>> Ran 0 tests (0 tests per mutation)
PIT discovers the test classes (362) and generates mutations (1132), but the coverage analysis phase cannot execute any tests — presumably because the shaded JUnit Platform classes inside the plugin are version 1.x and don't match the 6.x runtime.
Additional observation: gradle-pitest-plugin:1.19.0 causes a separate issue — it corrupts the Gradle test classpath so that even non-Pitest gradle test tasks fail with "Could not complete execution for Gradle Test Executor". Reverting to 1.15.0 restores normal test execution (but the 0-coverage Pitest issue remains).
Expected behavior
The pitest-junit5-plugin should work with JUnit Platform 6.0.x, since JUnit 6 is described as a smooth migration from JUnit 5 with unchanged annotations, extensions, and test discovery API.
Likely fix
Since JUnit 6 is API-compatible with JUnit 5 (unified versioning, not a rewrite), the fix is likely:
- Bump the shaded
junit-platform-launcher dependency to 6.0.x
- Update version compatibility checks that may be gating on
1.x platform versions
- Re-shade and release
Impact
This blocks mutation testing for any project on Spring Boot 4+ (which is the current GA release). Spring Boot 4 manages junit-platform:6.0.3 via its BOM, and there's no clean way to downgrade to Platform 1.x without breaking Spring's test infrastructure.
References
Problem
JUnit 6.0.0 shipped with unified versioning — all artifacts (Platform, Jupiter, Vintage) now share the same
6.0.xversion number. What was previouslyjunit-platform-engine:1.10.xis nowjunit-platform-engine:6.0.x.Spring Boot 4.0.5 ships JUnit Platform 6.0.3 by default. Projects on Spring Boot 4 cannot use the pitest-junit5-plugin because the plugin's coverage analysis phase finds 0% coverage and runs 0 tests per mutation.
Reproduction
Environment:
junit-platform-engine:6.0.3(managed by Spring Boot BOM)gradle-pitest-plugin:1.15.0(1.19.0 corrupts the test classpath — see below)pitest:1.22.1(for JDK 25 / ASM 9.8+ support)pitest-junit5-plugin:1.2.1and1.2.2(both tested)Config (Gradle Kotlin DSL):
pitest { pitestVersion.set("1.22.1") junit5PluginVersion.set("1.2.2") targetClasses.set(setOf("com.example.*")) mutationThreshold.set(60) }Result:
PIT discovers the test classes (362) and generates mutations (1132), but the coverage analysis phase cannot execute any tests — presumably because the shaded JUnit Platform classes inside the plugin are version 1.x and don't match the 6.x runtime.
Additional observation:
gradle-pitest-plugin:1.19.0causes a separate issue — it corrupts the Gradle test classpath so that even non-Pitestgradle testtasks fail with"Could not complete execution for Gradle Test Executor". Reverting to 1.15.0 restores normal test execution (but the 0-coverage Pitest issue remains).Expected behavior
The pitest-junit5-plugin should work with JUnit Platform 6.0.x, since JUnit 6 is described as a smooth migration from JUnit 5 with unchanged annotations, extensions, and test discovery API.
Likely fix
Since JUnit 6 is API-compatible with JUnit 5 (unified versioning, not a rewrite), the fix is likely:
junit-platform-launcherdependency to 6.0.x1.xplatform versionsImpact
This blocks mutation testing for any project on Spring Boot 4+ (which is the current GA release). Spring Boot 4 manages
junit-platform:6.0.3via its BOM, and there's no clean way to downgrade to Platform 1.x without breaking Spring's test infrastructure.References