Skip to content

Latest commit

 

History

History
137 lines (102 loc) · 5.08 KB

File metadata and controls

137 lines (102 loc) · 5.08 KB

6.0.0-M1

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.

Overall Improvements

Bug Fixes

Deprecations and Breaking Changes

  • Minimum required Java version is now Java 17.

  • Platform, Jupiter, and Vintage artifacts now use the same version number.

New Features and Improvements

  • All JUnit modules now use JSpecify's nullability annotations to indicate which method parameters, return types, etc. can be null.

JUnit Platform

Bug Fixes

  • Fix support of --uid/--select-unique-id options in the console launcher.

Deprecations and Breaking Changes

  • Remove deprecated support for running the ConsoleLauncher without specifying a subcommand.

  • Remove support for deprecated non-conventional ConsoleLauncher options such as --h (rather than -h) or -help (rather than --help).

  • The junit-platform-runner module that provided the JUnit 4 based JUnitPlatform runner 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

    • BlacklistedExceptions class

    • PreconditionViolationException class (from org.junit.platform.commons.util)

    • ClasspathScanningSupport class

    • ConfigurationParameters.size() method

    • MethodSelector.getMethodParameterTypes() method

    • NestedMethodSelector.getMethodParameterTypes() method

    • ReportEntry() constructor

    • SingleTestExecutor class

    • LauncherDiscoveryRequestBuilder() constructor

    • LegacyReportingUtils class

    • TestPlan.add(TestIdentifier), TestPlan.getChildren(String), and TestPlan.getTestIdentifier(String) methods

    • TestPlan.add(TestIdentifier) and TestPlan.getChildren(String) methods

    • @UseTechnicalNames annotation

    • EngineTestKit.execute(String, EngineDiscoveryRequest), EngineTestKit.execute(TestEngine, EngineDiscoveryRequest), and EngineTestKit.Builder.filters(…​) methods

  • Support for "legacy semantics" for field and method searches that used to be configurable via the junit.platform.reflection.search.useLegacySemantics system 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.

New Features and Improvements

JUnit Jupiter

Bug Fixes

Deprecations and Breaking Changes

  • The following deprecated APIs have been removed:

    • MethodOrderer.Alphanumeric class

    • InvocationInterceptor.interceptDynamicTest(Invocation, ExtensionContext) method

  • The deprecated junit.jupiter.tempdir.scope configuration parameter is no longer supported.

  • The JRE enum constants for JAVA_8 to JAVA_16 have been deprecated because they can no longer be used at runtime since JAVA_17 is the new baseline. Please also manually update any values used with the minVersion and maxVersion attributes in @EnabledForJreRange and @DisabledForJreRange or the versions attributes in @EnabledOnJre and @DisabledOnJre to ensure that you are no longer declaring version values less than 17.

  • @EnabledForJreRange and @DisabledForJreRange now use JAVA_17 as their default min value.

  • The contracts for the Executable parameters of Kotlin-specific assertTimeout functions were changed from callsInPlace(executable, EXACTLY_ONCE) to callsInPlace(executable, AT_MOST_ONCE) which might result in compilation errors.

New Features and Improvements

  • Kotlin’s suspend modifier may now be applied to test and lifecycle methods.

  • The Arguments interface for parameterized tests is now officially a @FunctionalInterface.

JUnit Vintage

Bug Fixes

Deprecations and Breaking Changes

New Features and Improvements