Date of Release: ❓
Scope: ❓
For a complete list of all closed issues and pull requests for this release, consult the 6.0.0-M1 milestone page in the JUnit repository on GitHub.
-
Minimum required Java version is now Java 17.
-
Platform, Jupiter, and Vintage artifacts now use the same version number.
-
All JUnit modules now use JSpecify's nullability annotations to indicate which method parameters, return types, etc. can be
null.
-
Remove deprecated support for running the
ConsoleLauncherwithout specifying a subcommand. -
Remove support for deprecated non-conventional
ConsoleLauncheroptions such as--h(rather than-h) or-help(rather than--help). -
The
junit-platform-runnermodule that provided the JUnit 4 basedJUnitPlatformrunner has been discontinued. -
Support for Maven Surefire/Failsafe versions less than 3.0.0 has been dropped.
-
The following deprecated APIs have been removed:
-
ReflectionSupport.loadClass(String)method -
ReflectionUtils.readFieldValue(…)methods -
ReflectionUtils.getMethod(…)method -
BlacklistedExceptionsclass -
PreconditionViolationExceptionclass (fromorg.junit.platform.commons.util) -
ClasspathScanningSupportclass -
ConfigurationParameters.size()method -
MethodSelector.getMethodParameterTypes()method -
NestedMethodSelector.getMethodParameterTypes()method -
ReportEntry()constructor -
SingleTestExecutorclass -
LauncherDiscoveryRequestBuilder()constructor -
LegacyReportingUtilsclass -
TestPlan.add(TestIdentifier),TestPlan.getChildren(String), andTestPlan.getTestIdentifier(String)methods -
TestPlan.add(TestIdentifier)andTestPlan.getChildren(String)methods -
@UseTechnicalNamesannotation -
EngineTestKit.execute(String, EngineDiscoveryRequest),EngineTestKit.execute(TestEngine, EngineDiscoveryRequest), andEngineTestKit.Builder.filters(…)methods
-
-
Support for "legacy semantics" for field and method searches that used to be configurable via the
junit.platform.reflection.search.useLegacySemanticssystem property has been removed. JUnit now always adheres to standard Java semantics regarding whether a given field or method is visible or overridden according to the rules of the Java language.
-
The following deprecated APIs have been removed:
-
MethodOrderer.Alphanumericclass -
InvocationInterceptor.interceptDynamicTest(Invocation, ExtensionContext)method
-
-
The deprecated
junit.jupiter.tempdir.scopeconfiguration parameter is no longer supported. -
The
JREenum constants forJAVA_8toJAVA_16have been deprecated because they can no longer be used at runtime sinceJAVA_17is the new baseline. Please also manually update any values used with theminVersionandmaxVersionattributes in@EnabledForJreRangeand@DisabledForJreRangeor theversionsattributes in@EnabledOnJreand@DisabledOnJreto ensure that you are no longer declaring version values less than 17. -
@EnabledForJreRangeand@DisabledForJreRangenow useJAVA_17as their defaultminvalue. -
The contracts for the
Executableparameters of Kotlin-specificassertTimeoutfunctions were changed fromcallsInPlace(executable, EXACTLY_ONCE)tocallsInPlace(executable, AT_MOST_ONCE)which might result in compilation errors.