<commit_before>[[release-notes-5.0.0-m4]]
=== 5.0.0-M4

*Date of Release:* ❓

*Scope:* Fourth milestone release of JUnit 5 with a focus on parameterized tests,
enhanced dynamic tests, and documentation.

For a complete list of all _closed_ issues and pull requests for this release, consult the
link:{junit5-repo}+/milestone/7?closed=1+[5.0 M4] milestone page in the JUnit repository
on GitHub.


[[release-notes-5.0.0-m4-junit-platform]]
==== JUnit Platform

===== Bug Fixes

* The JUnit Platform Gradle plugin now adds its dependencies with a fixed version (same as plugin
  version) instead of a dynamic versioning scheme (was `1.+`) by default to ensure reproducible
  builds.
* All `findMethods()` implementations in `ReflectionUtils` no longer return bridge methods.
  Shadowed https://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html#jls-8.4.2[override-equal]
  methods are also no longer included in the result collection.

===== Deprecations and Breaking Changes

* Removed deprecated `selectNames()` name-based discovery selector from
  `DiscoverySelectors` in favor of the dedicated `selectPackage(String)`,
  `selectClass(String)`, and `selectMethod(String)` methods.
* `ClassNameFilter.includeClassNamePattern` was removed, please use
  `ClassNameFilter.includeClassNamePatterns` instead.
* `@IncludeClassNamePattern` was removed, please use `@IncludeClassNamePatterns` instead.
* `--hide-details` option of the `ConsoleLauncher` is deprecated, use `--details none` instead.
* The ZIP distribution containing the console launcher is no longer provided. It is replaced
  by an executable standalone JAR distribution. For details, see "New Features" section below.

===== New Features

* Custom `TestExecutionListener` implementations can now be registered automatically via
  Java's `ServiceLoader` mechanism.
* New `getGroupId()`, `getArtifactId()`, and `getVersion()` default methods in the
  `TestEngine` API for debugging and reporting purposes. By default, package attributes
  (i.e., typically from JAR manifest attributes) are used to determine the artifact ID
  and version; whereas, the group ID is empty by default. Consult the Javadoc for
  `{TestEngine}` for details.
* Logging information for discovered test engines has been enhanced to include the group
  ID, artifact ID, and version of each test engine if available via the `getGroupId()`,
  `getArtifactId()`, and `getVersion()` methods.
* The `--scan-classpath` option of the `ConsoleLauncher` now allows to scan JAR files for tests
  when they are supplied as explicit arguments (see <<running-tests-console-launcher-options>>).
* The new `--details <Details>` option of the `ConsoleLauncher` now allows to select an output
  details mode for when tests are executed. Use one of: `none`, `flat`, `tree` or `verbose`. If
  `none` is selected, then only the summary and test failures are shown (see
  <<running-tests-console-launcher-options>>).
* An executable `junit-platform-console-{platform-version}-standalone.jar` artifact containing
  the Jupiter and Vintage test engines with all dependencies is generated by the default build
  process, stored in `junit-platform-console/build/libs` and published to the Maven Central
  https://repo1.maven.org/maven2/org/junit/platform/junit-platform-console[repository]. It
  provides hassle-free usage of JUnit 5 in projects that manually manage their dependencies
  similar to the
  https://github.com/junit-team/junit4/wiki/Download-and-Install#plain-old-jar[plain-old JAR]
  known from JUnit 4.
* New `--exclude-classname` (`--N`) option added to the `ConsoleLauncher` accepting a regular
  expression to exclude those classes whose fully qualified names match. When this option is
  repeated, all patterns will be combined using OR semantics.

[[release-notes-5.0.0-m4-junit-jupiter]]
==== JUnit Jupiter

===== Bug Fixes

* Fix bug that prevented discovery of two or more methods of the same class.
* Enforce correct execution order of overridden `@BeforeEach`/`@AfterEach` methods when declared
  at multiple class hierarchy levels. It's now always `super.before`, `this.before`, `this.test`,
  `this.after` and `super.after`, even when the compiler added bridge methods.

===== Deprecations and Breaking Changes

* Removed deprecated `Assertions.expectThrows()` method in favor of `Assertions.assertThrows()`.

===== New Features and Improvements

* `Assertions.assertThrows()` now uses canonical names for exception types when
  generating assertion failure messages.
* `TestInstancePostProcessors` registered on test methods are now invoked.


[[release-notes-5.0.0-m4-junit-vintage]]
==== JUnit Vintage

_No changes since 5.0.0-M3_
<commit_msg>Updates the M4 release notes with new fail() signatures<commit_after>[[release-notes-5.0.0-m4]]
=== 5.0.0-M4

*Date of Release:* ❓

*Scope:* Fourth milestone release of JUnit 5 with a focus on parameterized tests,
enhanced dynamic tests, and documentation.

For a complete list of all _closed_ issues and pull requests for this release, consult the
link:{junit5-repo}+/milestone/7?closed=1+[5.0 M4] milestone page in the JUnit repository
on GitHub.


[[release-notes-5.0.0-m4-junit-platform]]
==== JUnit Platform

===== Bug Fixes

* The JUnit Platform Gradle plugin now adds its dependencies with a fixed version (same as plugin
  version) instead of a dynamic versioning scheme (was `1.+`) by default to ensure reproducible
  builds.
* All `findMethods()` implementations in `ReflectionUtils` no longer return bridge methods.
  Shadowed https://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html#jls-8.4.2[override-equal]
  methods are also no longer included in the result collection.

===== Deprecations and Breaking Changes

* Removed deprecated `selectNames()` name-based discovery selector from
  `DiscoverySelectors` in favor of the dedicated `selectPackage(String)`,
  `selectClass(String)`, and `selectMethod(String)` methods.
* `ClassNameFilter.includeClassNamePattern` was removed, please use
  `ClassNameFilter.includeClassNamePatterns` instead.
* `@IncludeClassNamePattern` was removed, please use `@IncludeClassNamePatterns` instead.
* `--hide-details` option of the `ConsoleLauncher` is deprecated, use `--details none` instead.
* The ZIP distribution containing the console launcher is no longer provided. It is replaced
  by an executable standalone JAR distribution. For details, see "New Features" section below.

===== New Features

* Custom `TestExecutionListener` implementations can now be registered automatically via
  Java's `ServiceLoader` mechanism.
* New `getGroupId()`, `getArtifactId()`, and `getVersion()` default methods in the
  `TestEngine` API for debugging and reporting purposes. By default, package attributes
  (i.e., typically from JAR manifest attributes) are used to determine the artifact ID
  and version; whereas, the group ID is empty by default. Consult the Javadoc for
  `{TestEngine}` for details.
* Logging information for discovered test engines has been enhanced to include the group
  ID, artifact ID, and version of each test engine if available via the `getGroupId()`,
  `getArtifactId()`, and `getVersion()` methods.
* The `--scan-classpath` option of the `ConsoleLauncher` now allows to scan JAR files for tests
  when they are supplied as explicit arguments (see <<running-tests-console-launcher-options>>).
* The new `--details <Details>` option of the `ConsoleLauncher` now allows to select an output
  details mode for when tests are executed. Use one of: `none`, `flat`, `tree` or `verbose`. If
  `none` is selected, then only the summary and test failures are shown (see
  <<running-tests-console-launcher-options>>).
* An executable `junit-platform-console-{platform-version}-standalone.jar` artifact containing
  the Jupiter and Vintage test engines with all dependencies is generated by the default build
  process, stored in `junit-platform-console/build/libs` and published to the Maven Central
  https://repo1.maven.org/maven2/org/junit/platform/junit-platform-console[repository]. It
  provides hassle-free usage of JUnit 5 in projects that manually manage their dependencies
  similar to the
  https://github.com/junit-team/junit4/wiki/Download-and-Install#plain-old-jar[plain-old JAR]
  known from JUnit 4.
* New `--exclude-classname` (`--N`) option added to the `ConsoleLauncher` accepting a regular
  expression to exclude those classes whose fully qualified names match. When this option is
  repeated, all patterns will be combined using OR semantics.

[[release-notes-5.0.0-m4-junit-jupiter]]
==== JUnit Jupiter

===== Bug Fixes

* Fix bug that prevented discovery of two or more methods of the same class.
* Enforce correct execution order of overridden `@BeforeEach`/`@AfterEach` methods when declared
  at multiple class hierarchy levels. It's now always `super.before`, `this.before`, `this.test`,
  `this.after` and `super.after`, even when the compiler added bridge methods.

===== Deprecations and Breaking Changes

* Removed deprecated `Assertions.expectThrows()` method in favor of `Assertions.assertThrows()`.

===== New Features and Improvements

* `Assertions.assertThrows()` now uses canonical names for exception types when
  generating assertion failure messages.
* `TestInstancePostProcessors` registered on test methods are now invoked.
* There are two new signatures `Assertions.fail` - `Assertions.fail(Throwable cause)` and
  `Assertions.fail(String message, Throwable cause)`.


[[release-notes-5.0.0-m4-junit-vintage]]
==== JUnit Vintage

_No changes since 5.0.0-M3_

{'fraction_non_alphanumeric': 0.09788525963149079, 'fraction_numerical': 0.008898659966499162, 'mean_word_length': 4.900555898702903, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3630704', 'n_tokens_mistral': 2682, 'n_tokens_neox': 2561, 'n_words': 1073}