Release Notes

This is a preview version that is not considered stable.
For the latest stable release, please see JUnit 6.1.3!

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.start module 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 ForkJoinPoolHierarchicalTestExecutorService in favor of the new ParallelHierarchicalTestExecutorServiceFactory that also supports WorkerThreadPoolHierarchicalTestExecutorService.

New Features and Improvements

  • Support for creating a ModuleSelector from a java.lang.Module and using its classloader for test discovery.

  • New WorkerThreadPoolHierarchicalTestExecutorService implementation used for parallel test execution that is backed by a regular thread pool rather than a ForkJoinPool. Engine authors should switch to use ParallelHierarchicalTestExecutorServiceFactory rather than instantiating a concrete HierarchicalTestExecutorService implementation for parallel execution directly.

  • OpenTestReportGeneratingListener now supports redirecting XML events to a socket via the new junit.platform.reporting.open.xml.socket configuration parameter. When set to a port number, events are sent to 127.0.0.1:<port> instead of being written to a file.

  • Allow implementations of HierarchicalTestEngine to specify which nodes require the global read lock by overriding the Node.isGlobalReadLockRequired() method to return false.

JUnit Jupiter

New Features and Improvements

  • Introduce new module org.junit.start for 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 the ExecutionMode of 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 the ExecutionMode of the dynamic container and/or its children in addition to its display name, test source URI, and children.

  • Enrich assertInstanceOf failure using the test subject Throwable as cause. It results in the stack trace of the test subject Throwable to get reported along with the failure.

  • Make implementation of HierarchicalTestExecutorService used for parallel test execution configurable via the new junit.jupiter.execution.parallel.config.executor-service configuration parameter to in order to add support for WorkerThreadPoolHierarchicalTestExecutorService. Please refer to the User Guide for details.

JUnit Vintage

No changes.

6.0.1

Date of Release: October 31, 2025