This document contains the change log for all JUnit 5 releases since 5.11 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.13.0-M3

Date of Release:

Scope:

For a complete list of all closed issues and pull requests for this release, consult the 5.13.0-M3 milestone page in the JUnit repository on GitHub.

JUnit Platform

Bug Fixes

Deprecations and Breaking Changes

New Features and Improvements

JUnit Jupiter

Bug Fixes

Deprecations and Breaking Changes

New Features and Improvements

JUnit Vintage

Bug Fixes

Deprecations and Breaking Changes

New Features and Improvements

5.13.0-M2

Date of Release: March 24, 2025

Scope: Fix regression in 5.13.0-M1

For a complete list of all closed issues and pull requests for this release, consult the 5.13.0-M2 milestone page in the JUnit repository on GitHub.

JUnit Platform

No changes.

JUnit Jupiter

Bug Fixes

  • Fix regression when executing @Nested classes compiled without -parameters in versions of Java prior to 21.

JUnit Vintage

No changes.

5.13.0-M1

Date of Release: March 21, 2025

Scope:

  • Introduce @ClassTemplate and @ParameterizedClass support in JUnit Jupiter

  • Access to ParameterInfo for JUnit Jupiter extensions

  • New @SentenceFragment annotation for use with IndicativeSentences display name generator

  • Add --redirect-stdout and --redirect-stderr options to ConsoleLauncher

  • Introduce test discovery support in EngineTestKit

  • Bug fixes and other minor improvements

For a complete list of all closed issues and pull requests for this release, consult the 5.13.0-M1 milestone page in the JUnit repository on GitHub.

JUnit Platform

Bug Fixes

  • Notify LauncherDiscoveryListener implementation registered via LaucherConfig or on the Launcher of selectorProcessed events.

New Features and Improvements

  • New ConsoleLauncher options --redirect-stdout and --redirect-stderr for redirecting stdout and stderr output streams to files.

  • Add TestDescriptor.Visitor.composite(List) factory method for creating a composite visitor that delegates to the given visitors in order.

  • Introduce test discovery support in EngineTestKit to ease testing for discovery issues produced by a TestEngine. Please refer to the User Guide for details.

  • This milestone contains preliminary APIs for reporting issues encountered by test engines during test discovery. However, these are still under active development and not yet ready for general use. If you’re a maintainer of a test engine, please wait for the next milestone before adopting these new APIs. If you’re interested, you can follow along our progress in #242.

JUnit Jupiter

Bug Fixes

  • If the autoCloseArguments attribute in @ParameterizedTest is set to true, all arguments returned by registered ArgumentsProvider implementations are now closed even if the test method declares fewer parameters.

  • AutoCloseable arguments returned by an ArgumentsProvider are now closed even if they are wrapped with Named.

  • AutoCloseable arguments returned by an ArgumentsProvider are now closed even if a failure happens prior to invoking the parameterized method.

New Features and Improvements

  • New @ClassTemplate annotation and ClassTemplateInvocationContextProvider API that allow declaring a top-level or @Nested test class as a template to be invoked multiple times. This may be used, for example, to inject different parameters to be used by all tests in the class template or to set up each invocation of the class template differently. Please refer to the User Guide for details.

  • New BeforeClassTemplateInvocationCallback and AfterClassTemplateInvocationCallback extension callback interfaces allow implementing extensions that are invoked before and after each invocation of a class template.

  • New @ParameterizedClass support that builds on @ClassTemplate and allows declaring a top-level or @Nested test class as a parameterized test class to be invoked multiple times with different arguments. The same @…​Source annotations supported with @ParameterizedTest may be used to provide arguments via constructor or field injection. Please refer to the User Guide for details.

  • New @ParameterizedClass-specific @BeforeParameterizedClassInvocation/@AfterParameterizedClassInvocation lifecycle methods that are invoked once before/after each invocation of the parameterized class.

  • Provide access to the parameters and resolved arguments of a @ParameterizedTest or @ParameterizedClass by storing ParameterInfo in the ExtensionContext.Store for retrieval by other extensions. Please refer to the Javadoc for details.

  • New @SentenceFragment annotation which allows one to supply custom text for individual sentence fragments when using the IndicativeSentences DisplayNameGenerator. See the updated documentation in the User Guide for an example.

  • New TestTemplateInvocationContext.prepareInvocation(ExtensionContext) callback method which allows extensions to prepare the ExtensionContext before the test template method is invoked. This may be used, for example, to store entries in the ExtensionContext.Store to benefit from its cleanup support or for retrieval by other extensions.

JUnit Vintage

No changes.

5.12.1

Date of Release: March 14, 2025

Scope: Bug fixes and enhancements since 5.12.0

For a complete list of all closed issues and pull requests for this release, consult the 5.12.1 milestone page in the JUnit repository on GitHub.

JUnit Platform

Deprecations and Breaking Changes

  • Set stable module name org.junit.platform.console.standalone for the junit-platform-console-standalone artifact, superseding the unstable name generated from the name of the JAR file when putting the artifact on the module path.

JUnit Jupiter

New Features and Improvements

  • New ExtensionContext.getEnclosingTestClasses() method to help with migration away from AnnotationSupport.findAnnotation(Class, Class, SearchOption) (deprecated since 1.12.0) to AnnotationSupport.findAnnotation(Class, Class, List).

JUnit Vintage

No changes.

5.12.0

Date of Release: February 21, 2025

Scope:

  • Output file attachments for tests and containers

  • Improvements to the Open Test Reporting XML output

  • Resource lock definition improvements

  • Thread dumps on test timeouts

  • Parameterized test validation improvements

  • Filtering support for auto-registered extensions

  • Kotlin contracts for assertions

  • Configurable Jupiter extension context scope

  • Enhancements to the ConsoleLauncher

  • Better support for GraalVM native image usage

  • Improved discovery support for file-based test engines

  • Customizable classpath scanning

  • Parallel execution support in JUnit Vintage engine

  • Numerous bug fixes and other enhancements

For complete details consult the 5.12.0 Release Notes online.