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

Please refer to the User Guide for comprehensive reference documentation for programmers writing tests, extension authors, and engine authors as well as build tool and IDE vendors.

6.0.0-RC2

Date of Release: August 25, 2025

Scope: Minor enhancements and bug fixes since 6.0.0-RC1.

For a complete list of all closed issues and pull requests for this release, consult the 6.0.0-RC2 milestone page 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.

JUnit Platform

Bug Fixes

  • The Launcher (specifically LauncherDiscoveryResult) now retains the original TestEngine registration order after pruning test engines without tests, thereby ensuring reliable test execution order of multiple test engines.

New Features and Improvements

  • The execute(TestPlan, TestExecutionListener…​) and execute(LauncherDiscoveryRequest, TestExecutionListener…​) methods in the Launcher API are no longer deprecated.

  • New discoveryRequest() method in LauncherDiscoveryRequestBuilder, which is an alias for the existing request() method and is intended to be used via a static import.

  • New executionRequest(…​) methods in LauncherExecutionRequestBuilder, which are aliases for the existing request(…​) methods and are intended to be used via a static import.

  • New selectClasses(…​) and selectClassesByName(…​) factory methods have been introduced in DiscoverySelectors to simplify use cases where one needs to select multiple individual test classes for the Launcher or EngineTestKit.

  • New selectors(List) builder method for EngineTestKit which can be used in conjunction with the new selectClasses(…​) and selectClassesByName(…​) factory methods in DiscoverySelectors.

JUnit Jupiter

No changes.

JUnit Vintage

No changes.

6.0.0-RC1

Date of Release: August 20, 2025

Scope:

  • Display name improvements for parameterized classes and tests

  • Replacing of non-printable control characters in display names

  • Deterministic order of @Nested classes

  • Inheritance of @TestMethodOrder by enclosed @Nested classes

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

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

JUnit Platform

Deprecations and Breaking Changes

  • The methods findNestedClasses and streamNestedClasses in ReflectionSupport now return nested classes declared in the same enclosing class or interface ordered in a deterministic but intentionally nonobvious way.

New Features and Improvements

  • Stack traces are now pruned up to the test method or lifecycle method.

  • Convention-based conversion in ConversionSupport now supports factory methods and factory constructors that accept a single CharSequence argument in addition to the existing support for factories that accept a single String argument.

  • Non-printable control characters in display names are now replaced with alternative representations. For example, \n is replaced with <LF>. This applies to all display names in JUnit Jupiter, @SuiteDisplayName, and any other test engines that subclass AbstractTestDescriptor. Please refer to the User Guide for details.

  • To help diagnosing potentially invalid invocations, the Console Launcher now logs warnings for nonexistent classpath roots added via --classpath or --scan-classpath rather than silently ignoring them.

JUnit Jupiter

Bug Fixes

  • CSV headers are now properly supported with the default display name pattern and the explicit {argumentsWithNames} display name pattern for parameterized tests that utilize the useHeadersInDisplayName flag in @CsvSource and @CsvFileSource. Specifically, the parameter name is no longer duplicated in the display name when a CSV header is desired instead.

Deprecations and Breaking Changes

  • For consistency with test methods, @Nested classes declared in the same enclosing class or interface are now ordered in a deterministic but intentionally nonobvious way.

New Features and Improvements

  • Text-based arguments in display names for parameterized tests are now quoted by default. In addition, special characters are escaped within quoted text. Please refer to the User Guide for details.

  • Fallback String-to-Object Conversion for parameterized tests now supports factory methods and factory constructors that accept a single CharSequence argument in addition to the existing support for factories that accept a single String argument.

  • Non-printable control characters in display names are now replaced with alternative representations. Please refer to the User Guide for details.

  • For consistency with @TestClassOrder, @TestMethodOrder annotations specified on a test class are now inherited by its @Nested inner classes, recursively.

  • Introduce MethodOrderer.Default and ClassOrderer.Default for reverting back to default ordering on a @Nested class and its @Nested inner classes when an enclosing class specifies a different orderer via @TestMethodOrder or @TestClassOrder, respectively.

JUnit Vintage

No changes.

6.0.0-M2

Date of Release: July 22, 2025

Scope:

  • New LauncherExecutionRequest API

  • Support for cancelling test execution via CancellationToken

  • New --fail-fast mode for ConsoleLauncher

  • Null-safe computeIfAbsent methods for stores

  • Strict evaluation of enum-based configuration parameters

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

JUnit Platform

Deprecations and Breaking Changes

  • Discontinue junit-platform-suite-commons which is now integrated into junit-platform-suite.

  • Deprecate Launcher.execute(TestPlan, TestExecutionListener[]) and Launcher.execute(LauncherDiscoveryRequest, TestExecutionListener[]) in favor of Launcher.execute(LauncherExecutionRequest)

  • 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.

  • Deprecate getOrComputeIfAbsent(…​) methods in NamespacedHierarchicalStore in favor of the new computeIfAbsent(…​) methods.

  • Setting an invalid value for one of the following enum-based configuration parameters now causes test discovery to fail:

    • junit.platform.discovery.issue.failure.phase

    • junit.platform.discovery.issue.severity.critical

New Features and Improvements

  • Introduce new Launcher.execute(LauncherExecutionRequest) API with corresponding LauncherExecutionRequestBuilder to enable the addition of parameters to test executions without additional overloads of execute(…​).

  • Introduce LauncherDiscoveryRequestBuilder.forExecution() method as a convenience method for constructing a LauncherExecutionRequest that contains a LauncherDiscoveryRequest.

  • Introduce support for cancelling a running test execution via a CancellationToken passed to the Launcher as part of a LauncherExecutionRequest and from there to all registered test engines. Please refer to the User Guide for details and a usage example.

  • Passing the --fail-fast option to the execute subcommand of the ConsoleLauncher now causes test execution to be cancelled after the first failed test.

  • Provide cancellation support for implementations of HierarchicalTestEngine such as JUnit Jupiter, Spock, and Cucumber.

  • Provide cancellation support for the @Suite test engine.

  • Introduce TestTask.getTestDescriptor() method for use in HierarchicalTestExecutorService implementations.

  • Introduce computeIfAbsent(…​) methods in NamespacedHierarchicalStore to simplify working with non-nullable types.

JUnit Jupiter

Deprecations and Breaking Changes

  • Change the return type of the provideTestTemplateInvocationContexts(ExtensionContext) method in the TestTemplateInvocationContextProvider interface from Stream<TestTemplateInvocationContext> to Stream<? extends TestTemplateInvocationContext>.

  • Remove support for the junit.jupiter.params.arguments.conversion.locale.format configuration parameter. Locale conversions are now always performed using the IETF BCP 47 language tag format supported by the Locale.forLanguageTag(String) factory method.

  • Deprecate getOrComputeIfAbsent(…​) methods in ExtensionContext.Store in favor of the new computeIfAbsent(…​) methods.

  • Setting an invalid value for one of the following enum-based configuration parameters now causes test discovery or execution to fail:

    • junit.jupiter.execution.parallel.mode.default

    • junit.jupiter.execution.parallel.mode.classes.default

    • junit.jupiter.execution.timeout.mode

    • junit.jupiter.execution.timeout.thread.mode.default

    • junit.jupiter.extensions.testinstantiation.extensioncontextscope.default

    • junit.jupiter.tempdir.cleanup.mode.default

    • junit.jupiter.testinstance.lifecycle.default

New Features and Improvements

  • Display names for @ParameterizedClass and @ParameterizedTest now consistently style name-value pairs for arguments using name = value formatting – for example, fruit = apple instead of fruit=apple.

  • Reason strings supplied to ConditionEvaluationResult APIs are now officially declared as @Nullable.

  • Introduce computeIfAbsent(…​) methods in ExtensionContext.Store to simplify working with non-nullable types.

JUnit Vintage

New Features and Improvements

  • Provide cancellation support for the Vintage test engine.

6.0.0-M1

Date of Release: June 27, 2025

Scope:

  • Java 17 and Kotlin 2.2 baseline

  • Single version number for Platform, Jupiter, and Vintage

  • Use of JSpecify annotations to document nullability

  • Removal of various deprecated behaviors and APIs

  • Integration of JFR functionality into junit-platform-launcher

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

  • Switch to FastCSV library for @CsvSource and @CsvFileSource

  • Support for using Kotlin suspend functions as test methods

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

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

  • Remove deprecated support for running the ConsoleLauncher without specifying a subcommand.

  • Remove support for deprecated non-conventional ConsoleLauncher options such as --h (rather than -h) or -help (rather than --help).

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

  • The junit-platform-jfr module that provided custom Java Flight Recorder (JFR) events for test discovery and execution has been discontinued. Instead, the functionality is now available directly in junit-platform-launcher without requiring an additional dependency.

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

  • 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

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

    • @UseTechnicalNames annotation

    • EngineTestKit.execute(String, EngineDiscoveryRequest), EngineTestKit.execute(TestEngine, EngineDiscoveryRequest), and EngineTestKit.Builder.filters(…​) 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)

JUnit Jupiter

Deprecations and Breaking Changes

  • The following deprecated APIs have been removed:

    • MethodOrderer.Alphanumeric class

    • InvocationInterceptor.interceptDynamicTest(Invocation, ExtensionContext) method

  • The deprecated junit.jupiter.tempdir.scope configuration parameter is no longer supported.

  • The JRE enum constants for JAVA_8 to JAVA_16 have been deprecated because they can no longer be used at runtime since JAVA_17 is the new baseline. Please also manually update any values used with the minVersion and maxVersion attributes in @EnabledForJreRange and @DisabledForJreRange or the versions attributes in @EnabledOnJre and @DisabledOnJre to ensure that you are no longer declaring version values less than 17.

  • @EnabledForJreRange and @DisabledForJreRange now use JAVA_17 as their default min value.

  • The contracts for the Executable parameters of Kotlin-specific assertTimeout functions were changed from callsInPlace(executable, EXACTLY_ONCE) to callsInPlace(executable, AT_MOST_ONCE) which might result in compilation errors.

  • As a result of migrating from univocity-parsers to FastCSV for @CsvSource and @CsvFileSource, root causes and messages of exceptions thrown for malformed CSV input may differ in some cases. While the overall parsing behavior remains consistent, this may affect custom error handling that relies on specific exception types or messages.

  • The lineSeparator attribute in @CsvFileSource has been removed. The line separator is now automatically detected, meaning that any of \r, \n, or \r\n is treated as a line separator.

  • Attributes such as ignoreLeadingAndTrailingWhitespace, nullValues, and others in @CsvSource and @CsvFileSource now apply to header fields as well as to regular fields.

  • Extra characters after a closing quote are no longer allowed in @CsvSource and @CsvFileSource. For example, if a single quote is used as the quote character, the following CSV value 'foo’INVALID,'bar' will now cause an exception to be thrown. This helps ensure that malformed input is not silently accepted or misinterpreted.

  • The junit-jupiter-migrationsupport artifact and its contained classes are now deprecated and will be removed in the next major version.

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

    • ExtensionContext.getConfigurationParameter(String, Function)

    • ExtensionContext.getOrComputeIfAbsent(K, Function)

    • ExtensionContext.getOrComputeIfAbsent(K, Function, Class)

New Features and Improvements

  • Kotlin’s suspend modifier may now be applied to test and lifecycle methods.

  • The Arguments interface for parameterized tests is now officially a @FunctionalInterface.

  • The implementation of @CsvSource and @CsvFileSource has been migrated from the no longer maintained univocity-parsers to FastCSV. This improves the consistency of CSV input handling, including for malformed entries, and provides better error reporting and overall performance.

JUnit Vintage

Deprecations and Breaking Changes

  • The JUnit Vintage engine is now deprecated and will report an INFO level discovery issue when it finds at least one JUnit 4 test class. For now, the intent of the deprecation is not to signal removal in the next major version but to clarify the intended purpose of the engine. It should only be used temporarily while migrating tests to JUnit Jupiter or another testing framework with native JUnit Platform support.

5.13.4

Date of Release: July 21, 2025

Scope: Bug fixes and enhancements since 5.13.3

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

Overall Changes

New Features and Improvements

  • Remove java.* packages from Import-Package headers in all jar manifests to maximize compatibility with older OSGi runtimes.

JUnit Platform

Bug Fixes

  • ClasspathResourceSelector no longer allows to be constructed with a resource name that is blank after removing the leading slash.

  • PackageSource.from(String) now allows to be constructed with an empty string to indicate the default package.

JUnit Jupiter

New Features and Improvements

  • Log only once per implementation type for CloseableResource implementations that do not implement AutoCloseable to avoid flooding console output with this warning.

JUnit Vintage

No changes.

5.13.3

Date of Release: July 4, 2025

Scope: Bug fixes and enhancements since 5.13.2

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

Overall Changes

New Features and Improvements

  • All experimental APIs have been promoted to maintained to indicate that they won’t be removed in any future 5.x release.

JUnit Platform

No changes.

JUnit Jupiter

Bug Fixes

  • Fix regression that caused top-level and static member classes annotated with @Nested to no longer be executed because they caused a discovery issue to be reported.

  • Stop reporting discovery issues for composed annotation classes that are meta-annotated with @Nested.

  • Stop reporting discovery issues for DefaultImpls classes generated by the Kotlin compiler for interfaces with non-abstract test methods.

  • When a customReason is supplied along with a null value for the default reason to ConditionEvaluationResult.disabled(String, String), the resulting reason is now "my custom reason" instead of "null ==> my custom reason".

New Features and Improvements

  • A blank reason supplied to a ConditionEvaluationResult factory method is now treated the same as a null reason, resulting in an empty Optional returned from ConditionEvaluationResult.getReason().

  • The Javadoc for factory methods in ConditionEvaluationResult now explicitly states that both null and blank values are supported for reason strings and that such values will result in an empty Optional returned from ConditionEvaluationResult.getReason().

  • Improve message of discovery issues reported for ineffective @Order annotations.

JUnit Vintage

No changes.

5.13.2

Date of Release: June 24, 2025

Scope: Bug fixes and enhancements since 5.13.1

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

JUnit Platform

Bug Fixes

  • If Git information is included in the Open Test Reporting XML format (see below), any credentials that may be configured as part the remote.origin.url setting in Git were previously written to the originUrl attribute of <git:repository> elements. For example, when cloning a GitHub repository using a URL like https://username:[email protected]/organization/repository.git, both username and password were included in the XML report. Since a report which includes this information may be shared, published, or archived (for example, on a CI server), this was reported as a potential security vulnerability (CVE-2025-53103). Any credentials are now replaced with *** before writing them to the XML report.

Deprecations and Breaking Changes

  • Including information about the Git repository (such as the commit hash and branch name) in the Open Test Reporting XML format is now an opt-in feature that can be enabled via a configuration parameter. Please refer to the User Guide for details.

JUnit Jupiter

Bug Fixes

  • Stop reporting discovery issues for cyclic inner class hierarchies not annotated with @Nested.

  • Stop reporting discovery issues for abstract inner classes that contain test methods but are not annotated with @Nested.

  • Stop reporting discovery issues for abstract test methods. Although they will not be executed, it is a valid pattern to annotate them with @Test for documentation purposes and override them in subclasses while re-declaring the @Test annotation.

New Features and Improvements

  • JAVA_26 has been added to the JRE enum for use with JRE-based execution conditions.

JUnit Vintage

No changes.

5.13.1

Date of Release: June 7, 2025

Scope: Bug fixes and enhancements since 5.13.0

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

JUnit Platform

No changes.

JUnit Jupiter

Bug Fixes

  • The 5.13.0 release introduced a regression regarding the execution order in test classes containing both test methods and @Nested test classes. When classpath scanning was used during test discovery — for example, when resolving a package selector for a @Suite class — test methods in @Nested classes were executed before test methods in their enclosing class. This undesired change in behavior has now been reverted so that tests in @Nested test classes are always executed after tests in enclosing test classes again.

  • Fix support for AnnotationBasedArgumentsProvider implementations that override the deprecated provideArguments(ExtensionContext, Annotation) method.

JUnit Vintage

No changes

5.13.0

Date of Release: May 30, 2025

Scope:

  • Introduce @ClassTemplate and @ParameterizedClass support in JUnit Jupiter

  • Access to ParameterInfo for JUnit Jupiter extensions

  • New @SentenceFragment annotation for use with IndicativeSentences display name generator

  • Add --redirect-stdout and --redirect-stderr options to ConsoleLauncher

  • Introduce test discovery support in EngineTestKit

  • Reporting of discovery issues for test engines

  • Resource management for launcher sessions and execution requests

  • GraalVM: removal of native-image.properties files from JARs

  • Bug fixes and other minor improvements

For complete details consult the 5.13.0 Release Notes online.