Release Notes

There is a newer version available.
For the latest stable release, please see JUnit 6.1.3!

This document contains the change log for all JUnit releases since 5.14 GA.

6.0.3

Date of Release: February 15, 2026

Scope: Bug fixes and enhancements since 6.0.2

For a complete list of all closed issues and pull requests for this release, consult the 6.0.3 milestone page in the JUnit repository on GitHub.

JUnit Platform

Bug Fixes

  • A deadlock issue in NamespacedHierarchicalStore.computeIfAbsent(N, K, Function) has been fixed.

JUnit Jupiter

Bug Fixes

  • @EnabledOnJre and @DisabledOnJre once again work reliably when used with JRE.OTHER in a test running on a Java runtime whose version is higher than the version of the last JAVA_* constant in the JRE enum.

JUnit Vintage

No changes.

6.0.2

Date of Release: January 6, 2026

Scope: Bug fixes and enhancements since 6.0.1

For a complete list of all closed issues and pull requests for this release, consult the 6.0.2 milestone page in the JUnit repository on GitHub.

JUnit Platform

Bug Fixes

  • Make ConsoleLauncher compatible with JDK 26 by avoiding final field mutations.

  • Enable recursive updates when using NamespacedHierarchicalStore.computeIfAbsent(N, K, Function). This provides parity with the deprecated NamespacedHierarchicalStore.getOrComputeIfAbsent(N, K, Function)

JUnit Jupiter

Bug Fixes

  • Allow using @ResourceLock on classes annotated with @ClassTemplate (or @ParameterizedClass).

  • Change API status of recommended method in ArgumentsProvider as well as ParameterDeclaration(s) as "maintained" rather than "experimental".

JUnit Vintage

No changes.

6.0.1

Date of Release: October 31, 2025

Scope: Bug fixes and enhancements since 6.0.0

For a complete list of all closed issues and pull requests for this release, consult the 6.0.1 milestone page in the JUnit repository on GitHub.

JUnit Platform

Bug Fixes

  • The jdk.jfr package is now an optional import when using the junit-platform-launcher as an OSGi bundle.

New Features and Improvements

  • Legacy documentation regarding Java 8 compatibility has been removed from the User Guide.

JUnit Jupiter

Bug Fixes

  • A regression introduced in version 6.0.0 caused an exception when using @CsvSource or @CsvFileSource if the delimiter or delimiterString attribute was set to #. This occurred because # was used as the default comment character without an option to change it. To resolve this, a new commentCharacter attribute has been added to both annotations. Its default value remains #, but it can now be customized to avoid conflicts with other control characters.

  • Fix IllegalAccessError thrown when using the Kotlin-specific assertDoesNotThrow assertion.

  • Stop reporting discovery issues for synthetic methods, particularly in conjunction with Kotlin suspend functions.

  • Fix support for test methods with the same signature as package-private methods declared in super classes in different packages.

Deprecations and Breaking Changes

  • The org.junit.jupiter.migrationsupport module descriptor has been marked as deprecated for removal.

New Features and Improvements

  • The @CsvSource and @CsvFileSource annotations now allow specifying a custom comment character using the new commentCharacter attribute.

  • Improve error message when @ParameterizedClass is used with field injection without providing enough arguments.

  • Allow calling the TypedArgumentConverter constructor for @Nullable T target types without having to cast class literals to Class<@Nullable T>.

JUnit Vintage

New Features and Improvements

  • Allow disabling the reporting of discovery issues by the JUnit Vintage engine (including the one reported for its deprecation) by setting the new junit.vintage.discovery.issue.reporting.enabled configuration parameter to false.

6.0.0

Date of Release: September 30, 2025

Scope:

  • Java 17 and Kotlin 2.1 baseline

  • Single version number for Platform, Jupiter, and Vintage

  • Use of JSpecify annotations to express nullability

  • Integration of JFR functionality in junit-platform-launcher

  • Removal of junit-platform-runner and junit-platform-jfr

  • Deterministic order of @Nested classes

  • MethodOrderer.Default and ClassOrderer.Default for @Nested classes

  • Inheritance of @TestMethodOrder by enclosed @Nested classes

  • Switch to FastCSV library for @CsvSource and @CsvFileSource

  • Support for using Kotlin suspend functions as test methods

  • New --fail-fast mode for ConsoleLauncher

  • Support for cancelling test execution via CancellationToken

  • Removal of various deprecated behaviors and APIs

For a complete list of all closed issues and pull requests for this release, consult the 6.0.0-M1, 6.0.0-M2, 6.0.0-RC1, 6.0.0-RC2, 6.0.0-RC3, and 6.0.0 milestone pages in the JUnit repository on GitHub.

Migration Guide

Please refer to the wiki for guidance on upgrading from JUnit 5.x.y to 6.0.0.

Overall Improvements

Deprecations and Breaking Changes

  • Minimum required Java version is now 17.

  • Minimum required Kotlin version is now 2.2.

  • Platform artifacts now use the same version number as Jupiter and Vintage artifacts.

New Features and Improvements

  • All JUnit modules now use JSpecify nullability annotations to indicate which method parameters, return types, etc. can be null.

JUnit Platform

Deprecations and Breaking Changes

  • Support for running the ConsoleLauncher without specifying a subcommand has been removed.

  • Support for non-conventional ConsoleLauncher options such as --h (rather than -h) or -help (rather than --help) has been removed.

  • The junit-platform-runner module which provided the JUnit 4 based JUnitPlatform runner has been removed.

  • The junit-platform-jfr module which provided custom Java Flight Recorder (JFR) events for test discovery and execution has been removed. The functionality is now available directly in the junit-platform-launcher module.

  • Support for Maven Surefire/Failsafe versions less than 3.0.0 has been removed.

  • The following deprecated APIs have been removed:

    • ReflectionSupport.loadClass(String) method

    • ReflectionUtils.readFieldValue(…​) methods

    • ReflectionUtils.getMethod(…​) method

    • BlacklistedExceptions class

    • PreconditionViolationException class (from org.junit.platform.commons.util)

    • ClasspathScanningSupport class

    • ConfigurationParameters.size() method

    • MethodSelector.getMethodParameterTypes() method

    • NestedMethodSelector.getMethodParameterTypes() method

    • ReportEntry() constructor

    • SingleTestExecutor class

    • LauncherDiscoveryRequestBuilder() constructor

    • LegacyReportingUtils class

    • TestPlan.add(TestIdentifier), TestPlan.getChildren(String), and TestPlan.getTestIdentifier(String) methods

    • @UseTechnicalNames annotation for suites

    • EngineTestKit.execute(String, EngineDiscoveryRequest), EngineTestKit.execute(TestEngine, EngineDiscoveryRequest), and EngineTestKit.Builder.filters(DiscoveryFilter…​) methods

  • Support for "legacy semantics" for field and method searches that used to be configurable via the junit.platform.reflection.search.useLegacySemantics system property has been removed. JUnit now always adheres to standard Java semantics regarding whether a given field or method is visible or overridden according to the rules of the Java language.

  • The type bounds of the following methods have been changed to be more flexible and allow nullable and non-nullable types:

    • ConfigurationParameters.get(String, Function)

    • NamespacedHierarchicalStore.getOrComputeIfAbsent(N, K, Function)

    • NamespacedHierarchicalStore.getOrComputeIfAbsent(N, K, Function, Class)

  • The junit-platform-suite-commons module has been removed. Its functionality is now integrated directly in the junit-platform-suite module.

  • ConversionSupport now converts String to Locale using the IETF BCP 47 language tag format supported by the Locale.forLanguageTag(String) factory method instead of the format used by the deprecated Locale(String) constructor.

  • All getOrComputeIfAbsent(…​) methods in NamespacedHierarchicalStore have been deprecated in favor of the new computeIfAbsent(…​) methods.