Skip to content

Latest commit

 

History

History
88 lines (66 loc) · 3.96 KB

release-notes-5.0.0-M3.adoc

File metadata and controls

88 lines (66 loc) · 3.96 KB

5.0.0-M3

Date of Release: September 30, 2016

Scope: Third milestone release of JUnit 5 with a focus on JUnit 4 interoperability, additional discovery selectors, and documentation.

Summary of Changes

The following is a list of global changes. For details regarding changes specific to the Platform, Jupiter, and Vintage, consult the dedicated subsections below. For a complete list of all closed issues and pull requests for this release, consult the 5.0 M3 milestone page in the JUnit repository on GitHub.

  • ❓❓❓

JUnit Platform
Bug Fixes
  • ColoredPrintingTestListener, which is used by the ConsoleLauncher, now outputs the actual exception type and its stack trace when printing an exception message.

  • Test classes in the default package are now picked up via classpath scanning when scanning classpath roots — for example, in conjunction with the JUnit Platform Gradle plugin when no explicit packages have been selected.

Deprecations and Breaking Changes
  • ClasspathSelector has been renamed to ClasspathRootSelector to avoid confusion with ClasspathResourceSelector.

  • PackageSelector and DiscoverySelectors.selectPackage() have been renamed to JavaPackageSelector and DiscoverySelectors.selectJavaPackage() to align with JavaPackageSource.

  • ClassSelector and DiscoverySelectors.selectClass() have been renamed to JavaClassSelector and DiscoverySelectors.selectJavaClass() to align with JavaClassSource.

  • MethodSelector and DiscoverySelectors.selectMethod() have been renamed to JavaMethodSelector and DiscoverySelectors.selectJavaMethod() to align with JavaMethodSource.

  • The -p command-line option for configuring additional classpath entries for the ConsoleLauncher has been renamed to -cp in order to align with the option names for the standard java executable. In addition, a new --class-path alias has been introduced, while the existing --classpath command-line option remains unchanged.

New Features
  • New selectUri(*) methods in DiscoverySelectors for selecting URIs. A TestEngine can retrieve such values by querying registered instances of UriSelector.

  • New selectFile() and selectDirectory() methods in `DiscoverySelectors for selecting files and directories in the file system. A TestEngine can retrieve such values by querying registered instances of FileSelector and DirectorySelector.

  • New selectClasspathResource(String) method in DiscoverySelectors for selecting classpath resources such as XML or JSON files by name, where the name is a /-separated path name for the resource within the current classpath. A TestEngine can retrieve such values by querying registered instances of ClasspathResourceSelector.

  • The selectMethod(String) method in DiscoverySelectors now supports selection of a fully qualified method name for a method that accepts parameters — for example, "org.example.TestClass#testMethod(org.junit.jupiter.api.TestInfo)".

  • The TestExecutionSummary used by the ConsoleLauncher and the JUnit Platform Gradle plugin now includes statistics for all container events in addition to test events.

JUnit Jupiter
Bug Fixes
  • The JupiterTestEngine now supports selection of test methods via their unique ID for methods that accept arrays or primitive types as parameters.

New Features
  • Support for lazy and preemptive timeouts with lambda expressions in Assertions. See examples in AssertionsDemo and consult the {Assertions} Javadoc for further details.

  • New variants of Assertions.assertAll() that accept streams of executables (i.e., Stream<Executable>).

JUnit Vintage

No changes since 5.0.0-M2