Release Notes
This document contains the change log for all JUnit releases since 6.0 GA.
6.1.0
Date of Release: May 19, 2026
Scope:
-
New
@DefaultLocaleand@DefaultTimeZonebuilt-in extensions -
New built-in extension for clearing/setting/restoring system properties
-
Configurable deletion strategy for
@TempDirthat allows ignoring failures -
New
org.junit.startmodule for usage in compact source files -
Execution mode configuration support for dynamic tests and containers
-
Improved stack trace pruning for assertion failures
-
New
org.junit.jupiter.api.Constantsclass for referencing configuration parameters -
Improvements to legacy XML reports for parameterized test classes
-
New parallel test executor implementation
-
New experimental memory cleanup mode for large test suites
For a complete list of all closed issues and pull requests for this release, consult the 6.1.0-M1, 6.1.0-RC1, and 6.1.0 milestone pages in the JUnit repository on GitHub.
JUnit Platform
Bug Fixes
-
A deadlock issue in
NamespacedHierarchicalStore.computeIfAbsent(N, K, Function)has been fixed. -
WorkerThreadPoolHierarchicalTestExecutorServicenow rechecks the done condition before rejecting an extraneous worker. -
Missing precondition checks have been added to
Launcherimplementations. -
Failures to resolve selectors are now propagated by the Suite Engine.
-
AbstractTestDescriptor.getChildren()now returns immutable set of children rather than a merely unmodifiable set.
Deprecations and Breaking Changes
-
Deprecate constructors for
ForkJoinPoolHierarchicalTestExecutorServicein favor of the newParallelHierarchicalTestExecutorServiceFactorythat also supportsWorkerThreadPoolHierarchicalTestExecutorService. -
In the
EngineTestKit,Executions.started()has been deprecated in favor ofExecutions.finished(), since started executions are always finished.
New Features and Improvements
-
Support for creating a
ModuleSelectorfrom ajava.lang.Moduleand using its classloader for test discovery. -
New
selectClasspathResources(String…)andselectClasspathResources(List<String)methods inDiscoverySelectors. -
OpenTestReportGeneratingListenernow supports redirecting XML events to a socket via the newjunit.platform.reporting.open.xml.socketconfiguration parameter. When set to a port number, events are sent to127.0.0.1:<port>instead of being written to a file. -
New
WorkerThreadPoolHierarchicalTestExecutorServiceimplementation used for parallel test execution that is backed by a regular thread pool rather than aForkJoinPool. Engine authors should switch to useParallelHierarchicalTestExecutorServiceFactoryrather than instantiating a concreteHierarchicalTestExecutorServiceimplementation for parallel execution directly. -
New experimental memory cleanup mode that is useful when executing a large number of tests. It can be enabled via the new
junit.platform.execution.memory.cleanup.enabledconfiguration parameter. -
Allow implementations of
HierarchicalTestEngineto specify which nodes require the global read lock by overriding theNode.isGlobalReadLockRequired()method to returnfalse. -
TestDescriptorimplementation requirements have now been clarified in the corresponding Javadoc. -
The
UniqueId.uniqueIdFormatfield has been removed, reducing the size ofUniqueIdobjects.
JUnit Jupiter
Bug Fixes
-
Recursive updates are now supported when using
computeIfAbsent(K, Function, Class)in theExtensionContext.Store, providing parity with the deprecatedgetOrComputeIfAbsent(K, Function, Class)method. -
Legacy XML reports now include the index of
@ClassTemplate/@ParameterizedClassinvocations in test names to make them unique. -
Legacy XML reports now include parent display names to make it easier to distinguish between invocations for different parameters.
Deprecations and Breaking Changes
-
The
OTHERconstant ofJREhas been deprecated in favor of theint/int[]annotation attributes of@EnabledOnJre,@DisabledOnJre,@EnabledForJreRange, and@DisabledForJreRangewhich allow referencing JRE versions later than those supported by theJREenum. -
The
org.junit.jupiter.engine.Constantsclass and its constants are now deprecated in favor oforg.junit.jupiter.api.Constants.
New Features and Improvements
-
JUnit Pioneer's
DefaultLocaleExtensionandDefaultTimeZoneExtensionare now part of JUnit Jupiter. Find examples in the User Guide. -
JUnit Pioneer’s
SystemPropertyExtensionis now part of JUnit Jupiter. Find examples in the User Guide. For details regarding implementation differences between JUnit Pioneer and Jupiter, see the corresponding pull request. -
@TempDirnow allows configuring a deletion strategy for temporary directories. This is typically used to gain control over what happens when deletion of a file or directory fails (see User Guide for details). -
JAVA_27has been added to theJREenum for use withJRE-based execution conditions. -
Introduce new module
org.junit.startfor writing and running tests. It simplifies using JUnit in compact source files together with a singlemodule importstatement. Find an example at the User Guide. -
Argumentsmay now be created from instances ofIterablevia the following new methods which make it easier to dynamically build arguments from collections when using@ParameterizedTest.-
Arguments.of(Iterable<?>) -
Arguments.argumentsFrom(Iterable<?>)(alias forof(Iterable<?>)) -
Arguments.argumentSetFrom(String, Iterable<?>) -
Arguments.toList()— returns a mutableList<@Nullable Object>
-
-
@EmptySourcenow supportsIterable,Iterator, andListIterator. -
@Deprecatedfactory methods are now excluded in the fallback String-to-Object conversion algorithm. -
Introduce new
dynamicTest(Consumer<? super Configuration>)factory method for dynamic tests. It allows configuring theExecutionModeof the dynamic test in addition to its display name, test source URI, and executable. -
Introduce new
dynamicContainer(Consumer<? super Configuration>)factory method for dynamic containers. It allows configuring theExecutionModeof the dynamic container and/or its children in addition to its display name, test source URI, and children. -
Enrich
assertInstanceOffailure using the test subjectThrowableas cause. It results in the stack trace of the test subjectThrowableto get reported along with the failure. -
Make implementation of
HierarchicalTestExecutorServiceused for parallel test execution configurable via the newjunit.jupiter.execution.parallel.config.executor-serviceconfiguration parameter to in order to add support forWorkerThreadPoolHierarchicalTestExecutorService. Please refer to the User Guide for details. -
Internal stack frames are now removed from
AssertionFailedErrorstack traces. -
New
trimStacktrace(Class<?>)andretainStackTraceElements(int)methods inAssertionFailureBuilderwhich allow user-defined assertions to trim their stack traces. -
Generic inline value classes (such as
kotlin.Result<T>) can now be used as parameters in@ParameterizedTestmethods whenkotlin-reflectis on the classpath. Note, however, that primitive-wrapper inline value classes (such asUIntor custom value classes wrapping primitives) are not yet supported. -
Kotlin-specific assertions now include a variant of
assertThrowsExactlywith reified generics. -
The new
org.junit.jupiter.api.Constantsclass provides constants for Configuration Parameters specific to the Jupiter engine. -
The
@EmptySourceannotation now provides atypeattribute that allows configuring the type of the empty argument explicitly. This is intended to be used in conjunction with anArgumentConverterthat supports the specified type.
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.
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.
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
JUnit Jupiter
Bug Fixes
-
A regression introduced in version 6.0.0 caused an exception when using
@CsvSourceor@CsvFileSourceif thedelimiterordelimiterStringattribute was set to#. This occurred because#was used as the default comment character without an option to change it. To resolve this, a newcommentCharacterattribute has been added to both annotations. Its default value remains#, but it can now be customized to avoid conflicts with other control characters. -
Fix
IllegalAccessErrorthrown when using the Kotlin-specificassertDoesNotThrowassertion. -
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.migrationsupportmodule descriptor has been marked as deprecated for removal.
New Features and Improvements
-
The
@CsvSourceand@CsvFileSourceannotations now allow specifying a custom comment character using the newcommentCharacterattribute. -
Improve error message when
@ParameterizedClassis used with field injection without providing enough arguments. -
Allow calling the
TypedArgumentConverterconstructor for@Nullable Ttarget types without having to cast class literals toClass<@Nullable T>.
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-runnerandjunit-platform-jfr -
Deterministic order of
@Nestedclasses -
MethodOrderer.DefaultandClassOrderer.Defaultfor@Nestedclasses -
Inheritance of
@TestMethodOrderby enclosed@Nestedclasses -
Switch to FastCSV library for
@CsvSourceand@CsvFileSource -
Support for using Kotlin
suspendfunctions as test methods -
New
--fail-fastmode for ConsoleLauncher -
Support for cancelling test execution via
CancellationToken -
Removal of various deprecated behaviors and APIs
For complete details consult the 6.0.0 Release Notes online.