
"The JUnit team has released JUnit 6.0.0 (GA on September 30, 2025), unifying version numbers across Platform, Jupiter, and Vintage and raising the minimum to Java 17 (and Kotlin 2.2 for Kotlin test code). The update adds native support for Kotlin tests, a new API with fail-fast execution in the ConsoleLauncher, built-in Java Flight Recorder (JFR) listeners, adoption of JSpecify nullability across modules, and a switch to FastCSV for CSV-driven parameterized tests."
"For Kotlin users, the most visible improvement is direct support. Previously, coroutine tests often wrapped bodies in runBlocking; with JUnit 6, developers can declare on test and lifecycle methods and call suspending APIs directly. This removes boilerplate and makes coroutine tests read like the production code they exercise. // Before JUnit 6 @Test fun foo() = runBlocking { delay(1000) assertEquals(1, 1) } // With JUnit 6 @Test suspend fun foo() { delay(1000) // suspend call works directly assertEquals(1, 1) }"
JUnit 6.0.0 (GA September 30, 2025) standardizes versioning across Platform, Jupiter, and Vintage and raises the minimum runtime to Java 17 and Kotlin 2.2 for test code. Native Kotlin test support allows suspending test and lifecycle methods, removing runBlocking boilerplate. A new API includes fail-fast ConsoleLauncher execution and built-in Java Flight Recorder listeners. All modules adopt JSpecify nullability annotations for clearer nullable/non-nullable contracts and better IDE support. FastCSV replaces the previous CSV driver for parameterized tests. Vintage remains as a JUnit 4 bridge but is deprecated. Deterministic nested-class ordering and MethodOrderer.Default provide explicit ordering controls.
Read at InfoQ
Unable to calculate read time
Collection
[
|
...
]