Release Notes
This document contains the change log for all JUnit releases since 6.1.0.
6.2.0-M1
Date of Release: ❓
Scope: ❓
For a complete list of all closed issues and pull requests for this release, consult the 6.2.0-M1 milestone page in the JUnit repository on GitHub.
JUnit Platform
Bug Fixes
-
When scanning the classpath, the resolved path is used to cache an open jar file system rather than a (potential) symlink.
-
HierarchicalTestEngineimplementations now wait for the dynamic tests a node has already submitted even if the node’sexecute()method throws an exception. Previously, with parallel execution, such dynamic tests could finish after their parent, e.g. when the arguments source of a@ParameterizedTestor@ParameterizedClassor the children stream of aDynamicContainerthrew an exception. -
The generic type parameters of
Trymethods now consistently allow nullable types. -
When scanning the classpath, a separate file system is now created for each jar file rather than a shared one. Thus, classpath scanning no longer fails or interferes with other code if a file system for the same jar file has already been opened elsewhere.
-
Classpath scanning now finds packages within jar files whose names contain non-ASCII characters.
New Features and Improvements
-
When using
ConsoleLauncherwith the-cp/--classpathoption, it now creates a customClassLoaderthat does not implementAutoCloseableto avoid accidentally closing it in test code which can lead to test failures that are hard to diagnose. -
When using a third-party engine that uses the
junit-prefix a discovery issue is emitted. -
junit-platform-console-standaloneis now part of thejunit-bom -
@org.junit.platform.suite.api.Disabledcan be used annotate a@Suite-annotated class. If so annotated, the suite will not be executed. -
The
org.junit.jupiter.api.assertThrowsKotlin API and its related functions have added variants that use an exception class as a value rather than a type parameter. This is to primarily to address the current issue/s when trying to use@ParameterizedTestthat produces exceptions as values. -
ConsoleLauncherwith--details=verbosenow reports on each test atomically and indents its output correctly when tests are executed in parallel. Previously, the reported output from different tests could interleave. -
Test Engine and Jupiter Extension authors may generate a machine-readable overview of configuration parameters. See Documenting Configuration Parameters for more information.
-
Platform configuration parameters are documented in
META-INF/junit-platform-configuration-metadata.json -
Test engines using the
ParallelHierarchicalTestExecutorServiceFactorynow use theWORKER_THREAD_POOLexecutor service by default. -
Test engines may now access the store scoped to the enclosing launcher session via the new
EngineDiscoveryRequest.getSessionScopedStore()API. This can be used to store or cache information that is reused during test execution or later discovery phases.
JUnit Jupiter
Bug Fixes
-
The
junit.jupiter.params.displayname.argument.maxlengthconfiguration parameter is now validated and rejected with a clear error when set to a non-positive value instead of causing parameterized tests to fail with an internal exception. -
The elements of
@CsvSource.value[]are now treated as individual CSV documents. This prevents unfinished quotes in one document from affecting another. -
@Nestedtest classes declared in super classes of a test class are now discovered and executed even if they have the same simple name as a@Nestedclass declared in the test class. -
If the stream returned by a
@TestFactorymethod throws an exception, the dynamic tests it has already provided now finish before the@AfterEachmethods and after-each callbacks of the factory method are executed. Previously, with parallel execution, these could run while the dynamic tests were still executing. -
ClassOrderer.RandomandMethodOrderer.Randomnow log the used seed only once per launcher session.
Deprecations and Breaking Changes
-
When using
@CsvSource.value[]CSV records starting with a comment character cause the test to fail. Either changecommentCharacterto something else or enclose the field in quotes. -
When using
@CsvSource.value[]thecommentCharactermust be distinct from bothdelimiterandquoteCharacter. -
When the timeout provided to
assertTimeout,assertTimeoutPreemptivelyand test methods annotated with@Timeoutis not a positive value less than 263 nanoseconds (approximately 292 years) aPreconditionViolationExceptionis thrown. -
ExtensionContext.NamespaceandExtensionContext.Storehave been deprecated in favor oforg.junit.jupiter.api.store.Namespaceandorg.junit.jupiter.api.store.Store. In most cases, changing theNamespaceandStoreimports suffices to migrate.==== New Features and Improvements
-
Added
OS.NETBSDandOS.DRAGONFLYBSDenum constants for use with@EnabledOnOsand@DisabledOnOs. -
Failures caused by
@Timeoutexpirations now include a hint about enabling thread dumps. -
The
assertTimeout,assertTimeoutPreemptivelyand methods annotated with@Timeoutnow measure the execution time with sub-millisecond precision. -
Jupiter configuration parameters are documented in
META-INF/junit-platform-configuration-metadata.json -
The
junit.jupiter.execution.parallel.config.executor-serviceconfiguration parameter now defaults toWORKER_THREAD_POOLwhen parallel execution is enabled. -
Implementations of
ClassOrdererorMethodOrderermay now access the store scoped to the enclosing launcher session via the newDiscoveryContext.getStore(…)API. This can be used to store or cache information that is reused during test execution or later discovery phases. -
New
org.junit.jupiter.api.storepackage containingStoreandNamespaceinterfaces which are now extended byExtensionContext.StoreandExtensionContext.Namespace, respectively.
6.1.3
Date of Release: ❓
Scope: Bug fixes and enhancements since 6.1.0
For a complete list of all closed issues and pull requests for this release, consult the 6.1.3 milestone page in the JUnit repository on GitHub.
6.1.2
Date of Release: July 12, 2026
Scope: Bug fixes and enhancements since 6.1.1
For a complete list of all closed issues and pull requests for this release, consult the 6.1.2 milestone page in the JUnit repository on GitHub.
6.1.1
Date of Release: June 28, 2026
Scope: Bug fixes and enhancements since 6.1.0
For a complete list of all closed issues and pull requests for this release, consult the 6.1.1 milestone page in the JUnit repository on GitHub.
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 complete details consult the 6.1.0 Release Notes online.