Date of Release: July 6, 2023
Scope:
-
New
@SelectMethod
support in test@Suite
classes. -
Various enhancements for discovery selectors for classes and methods, including additional support for custom ClassLoader arrangements.
-
Improved
@TempDir
support for cleaning up files and directories on Windows. -
Revised stack trace pruning support.
-
Various documentation improvements.
-
Minor changes and enhancements since 5.10 M1.
For a complete list of all closed issues and pull requests for this release, consult the 5.10.0-RC1 milestone page in the JUnit repository on GitHub.
-
The
getMethodParameterTypes()
methods inMethodSelector
andNestedMethodSelector
have been deprecated and replaced bygetParameterTypeNames()
for greater clarity. -
Methods in
DiscoverySelectors
that accept aClassLoader
now declare theClassLoader
as the first parameter. This is only a breaking change for code that relies on the new methods introduced in JUnit Platform 1.10 M1.
-
New
@SelectMethod
selector support in the@Suite
test engine. -
Classes may now be selected by fully-qualified name via the
names
attribute in@SelectClasses
. -
New
selectMethod()
andselectNestedMethod()
variants inDiscoverySelectors
that accept aClass<?>…
argument of parameter types as a type-safe alternative to providing the names of parameter types as a comma-delimited string. -
Stack trace pruning has been revised and now only removes calls from the
org.junit
,jdk.internal.reflect
, andsun.reflect
packages. Please refer to the User Guide for details. -
New
getAncestors()
method inTestDescriptor
.
-
@TempDir
can now be used as a meta-annotation in order to create custom composed annotations. See the@JimfsTempDir
example in the User Guide for details. -
@TempDir
now successfully cleans up files and directories on Windows that are set to read-only. -
New
reason
attribute in@Execution
which can be used to document the reason for using the selected execution mode. -
The User Guide now includes an example implementation of the
RandomNumberExtension
in order to improve the documentation for extension registration via@ExtendWith
on fields. -
Lifecycle and thread-safety semantics are now documented for the
TempDirFactory
SPI. -
The scope of applicability for
TestWatcher
implementations is now more extensively documented in the User Guide and Javadoc. -
JAVA_22
has been added to theJRE
enum for use with JRE-based execution conditions.