Release Notes
This document contains the change log for all JUnit releases since 6.0 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.1.0-M1
Date of Release: November 17, 2025
Scope:
-
New
org.junit.startmodule for usage in compact source files -
Execution mode configuration support for dynamic tests and containers
-
New parallel test executor implementation
For a complete list of all closed issues and pull requests for this release, consult the 6.1.0-M1 milestone page in the JUnit repository on GitHub.
JUnit Platform
Deprecations and Breaking Changes
-
Deprecate constructors for
ForkJoinPoolHierarchicalTestExecutorServicein favor of the newParallelHierarchicalTestExecutorServiceFactorythat also supportsWorkerThreadPoolHierarchicalTestExecutorService.
New Features and Improvements
-
Support for creating a
ModuleSelectorfrom ajava.lang.Moduleand using its classloader for test discovery. -
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. -
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. -
Allow implementations of
HierarchicalTestEngineto specify which nodes require the global read lock by overriding theNode.isGlobalReadLockRequired()method to returnfalse.
JUnit Jupiter
New Features and Improvements
-
Introduce new module
org.junit.startfor writing and running tests. It simplifies using JUnit in compact source files together with a single module import statement: -
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.