This document contains the change log for all JUnit 5 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.
5.14.1
Date of Release: October 31, 2025
Scope: Bug fixes and enhancements since 5.14.0
For a complete list of all closed issues and pull requests for this release, consult the 5.14.1 milestone page in the JUnit repository on GitHub.
5.14.0
Date of Release: September 30, 2025
Scope:
-
Bug fixes and enhancements since 5.13.x
-
Deprecations along with new APIs to ease migration to JUnit 6
For a complete list of all closed issues and pull requests for this release, consult the 5.14.0-RC1 and 5.14.0 milestone pages in the JUnit repository on GitHub.
|
Migration Guide
Please refer to the wiki for guidance on upgrading to JUnit 5.14. |
JUnit Platform
Bug Fixes
-
The
Launcher(specificallyLauncherDiscoveryResult) now retains the originalTestEngineregistration order after pruning test engines without tests, thereby ensuring reliable test execution order of multiple test engines.
Deprecations and Breaking Changes
-
Deprecate
OutputDirectoryProviderinterface in favor of the newOutputDirectoryCreatorinterface to resolve a cyclic package dependency along with the following APIs (which all have replacements working withOutputDirectoryCreator):-
EngineDiscoveryRequest.getOutputDirectoryProvider() -
ExecutionRequest.getOutputDirectoryProvider() -
LauncherDiscoveryRequestBuilder.outputDirectoryProvider(OutputDirectoryProvider) -
TestPlan.getOutputDirectoryProvider() -
EngineTestKit.Builder.outputDirectoryProvider(OutputDirectoryProvider)
-
-
Deprecate
org.junit.platform.commons.support.Resourceinterface in favor of the neworg.junit.platform.commons.io.Resourceinterface. -
Deprecate
Resource-related methods inReflectionSupportin favor of corresponding methods in the newResourceSupportclass:-
findAllResourcesInClasspathRoot(URI, Predicate) -
findAllResourcesInModule(String, Predicate) -
findAllResourcesInPackage(String, Predicate) -
streamAllResourcesInClasspathRoot(URI, Predicate) -
streamAllResourcesInModule(String, Predicate) -
streamAllResourcesInPackage(String, Predicate) -
tryToGetResources(String) -
tryToGetResources(String, ClassLoader)
-
-
Deprecate
DiscoverySelectors.selectClasspathResource(Set)method in favor ofselectClasspathResourceByName(Set). -
Deprecate
ClasspathResourceSelector.getClasspathResources()method in favor ofgetResources(). -
Deprecate the
EngineDiscoveryRequestResolver.Builder.addResourceContainerSelectorResolver(Predicate)method in favor ofaddResourceContainerSelectorResolver(ResourceFilter). -
Deprecate
Resource-related methods inClasspathScannerin favor of new methods usingorg.junit.platform.commons.io.ResourceandResourceFilter:-
scanForResourcesInPackage(String, Predicate) -
scanForResourcesInClasspathRoot(URI, Predicate)
-
New Features and Improvements
-
Emit discovery warning when
@SuiteDisplayNameis used with a blank string. -
To help diagnosing potentially invalid invocations, the Console Launcher now logs warnings for nonexistent classpath roots added via
--classpathor--scan-classpathrather than silently ignoring them. -
New classpath resource abstraction in
org.junit.platform.commons.io.Resourcewith support for loading resources or finding them on the classpath via static utility methods in the neworg.junit.platform.commons.support.ResourceSupportclass. -
New
Resource.of(String, URI)static factory method for creating anorg.junit.platform.commons.support.Resource. -
New
FileSource.withPosition(FilePosition)method to avoid the overhead of redundant canonicalization of files when usingFileSource.from(File, FilePosition)with many differentFilePositioninstances for the sameFile. -
New classpath resource abstraction in
org.junit.platform.commons.io.Resourcewith support for loading resources or finding them on the classpath via static utility methods in the neworg.junit.platform.commons.support.ResourceSupportclass.
JUnit Jupiter
Deprecations and Breaking Changes
-
MediaType.APPLICATION_JSON_UTF_8is now deprecated in favor of usingMediaType.APPLICATION_JSON, since the industry considers UTF-8 to be the implicit default encoding for theapplication/jsonmedia type. -
org.junit.jupiter.api.extension.MediaTypeis now deprecated in favor of the neworg.junit.jupiter.api.MediaType. -
The
publishFile(…)methods inTestReporterwhich accept anorg.junit.jupiter.api.extension.MediaTypeare now deprecated in favor of new variants which accept anorg.junit.jupiter.api.MediaType. -
The
publishFile(…)method inExtensionContextwhich accepts anorg.junit.jupiter.api.extension.MediaTypeis now deprecated in favor of a new variant which accepts anorg.junit.jupiter.api.MediaType. -
org.junit.jupiter.params.support.ParameterInfois now deprecated in favor of the neworg.junit.jupiter.params.ParameterInfo.
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.
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.
JUnit Jupiter
Bug Fixes
-
Fix regression that caused top-level and static member classes annotated with
@Nestedto 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
DefaultImplsclasses generated by the Kotlin compiler for interfaces with non-abstract test methods. -
When a
customReasonis supplied along with anullvalue for the defaultreasontoConditionEvaluationResult.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
ConditionEvaluationResultfactory method is now treated the same as anullreason, resulting in an emptyOptionalreturned fromConditionEvaluationResult.getReason(). -
The Javadoc for factory methods in
ConditionEvaluationResultnow explicitly states that bothnulland blank values are supported for reason strings and that such values will result in an emptyOptionalreturned fromConditionEvaluationResult.getReason(). -
Improve message of discovery issues reported for ineffective
@Orderannotations.
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.urlsetting in Git were previously written to theoriginUrlattribute of<git:repository>elements. For example, when cloning a GitHub repository using a URL likehttps://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
@Testfor documentation purposes and override them in subclasses while re-declaring the@Testannotation.
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 Jupiter
Bug Fixes
-
The 5.13.0 release introduced a regression regarding the execution order in test classes containing both test methods and
@Nestedtest classes. When classpath scanning was used during test discovery — for example, when resolving a package selector for a@Suiteclass — test methods in@Nestedclasses were executed before test methods in their enclosing class. This undesired change in behavior has now been reverted so that tests in@Nestedtest classes are always executed after tests in enclosing test classes again. -
Fix support for
AnnotationBasedArgumentsProviderimplementations that override the deprecatedprovideArguments(ExtensionContext, Annotation)method.
5.13.0
Date of Release: May 30, 2025
Scope:
-
Introduce
@ClassTemplateand@ParameterizedClasssupport in JUnit Jupiter -
Access to
ParameterInfofor JUnit Jupiter extensions -
New
@SentenceFragmentannotation for use withIndicativeSentencesdisplay name generator -
Add
--redirect-stdoutand--redirect-stderroptions toConsoleLauncher -
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.propertiesfiles from JARs -
Bug fixes and other minor improvements
For complete details consult the 5.13.0 Release Notes online.