CodexGuild Knowledge Base
JUnit 6: the modern JVM test platform
Canonical as of May 20, 2026
JUnit 6: the modern JVM test platform
JUnit 6 (2026) aligns the platform APIs, requires Java 17+, and ships a rebuilt documentation site. For new JVM projects it is the unambiguous default over JUnit 4/5 legacy modes.
JUnit 6
As of: 2026-05 (6.1.x)
What it is
The next major of the junit5-era platform (junit-jupiter + junit-platform). Java 17+ floor, aligned versions across artifacts (no more matching platform/engine patch levels), and a rewritten multi-version docs site.
Practical notes
- Existing Jupiter 5 tests compile and run on 6 with minimal changes — the API your tests use is stable; the removals are in engine/platform internals that build tools and custom launchers touch.
- Spring Boot 4's test slices target Jupiter; Gradle/Maven surefire providers need current versions.
- Vintage engine (JUnit 4 support) availability is narrowing — treat any remaining JUnit 4 suites as migration debt; mechanical conversion scripts cover most patterns.