[[v5.14.0]]
== 5.14.0

*Date of Release:* September 30, 2025

*Scope:*

* Bug fixes and enhancements since 5.13.x
* Deprecations along with new APIs to ease migration to JUnit 6

For a complete list of all _closed_ issues and pull requests for this release, consult the
link:{junit-framework-repo}+/milestone/108?closed=1+[5.14.0-RC1] and
link:{junit-framework-repo}+/milestone/109?closed=1+[5.14.0] milestone pages in the JUnit
repository on GitHub.

[TIP]
.Migration Guide
====
Please refer to the
https://github.com/junit-team/junit-framework/wiki/Upgrading-to-JUnit-5.14[wiki] for
guidance on upgrading to JUnit 5.14.
====


[[v5.14.0-junit-platform]]
=== JUnit Platform

[[v5.14.0-junit-platform-bug-fixes]]
==== Bug Fixes

* The `Launcher` (specifically `LauncherDiscoveryResult`) now retains the original
  `TestEngine` registration order after pruning test engines without tests, thereby
  ensuring reliable test execution order of multiple test engines.

[[v5.14.0-junit-platform-deprecations-and-breaking-changes]]
==== Deprecations and Breaking Changes

* Deprecate `OutputDirectoryProvider` interface in favor of the new
  `OutputDirectoryCreator` interface to resolve a cyclic package dependency along
  with the following APIs (which all have replacements working with
  `OutputDirectoryCreator`):
  - `EngineDiscoveryRequest.getOutputDirectoryProvider()`
  - `ExecutionRequest.getOutputDirectoryProvider()`
  - `LauncherDiscoveryRequestBuilder.outputDirectoryProvider(OutputDirectoryProvider)`
  - `TestPlan.getOutputDirectoryProvider()`
  - `EngineTestKit.Builder.outputDirectoryProvider(OutputDirectoryProvider)`
* Deprecate `org.junit.platform.commons.support.Resource` interface in favor of the new
  `org.junit.platform.commons.io.Resource` interface.
* Deprecate `Resource`-related methods in `ReflectionSupport` in favor of corresponding
  methods in the new `ResourceSupport` class:
  - `findAllResourcesInClasspathRoot(URI, Predicate)`
  - `findAllResourcesInModule(String, Predicate)`
  - `findAllResourcesInPackage(String, Predicate)`
  - `streamAllResourcesInClasspathRoot(URI, Predicate)`
  - `streamAllResourcesInModule(String, Predicate)`
  - `streamAllResourcesInPackage(String, Predicate)`
  - `tryToGetResources(String)`
  - `tryToGetResources(String, ClassLoader)`
* Deprecate `DiscoverySelectors.selectClasspathResource(Set)` method in favor of
  `selectClasspathResourceByName(Set)`.
* Deprecate `ClasspathResourceSelector.getClasspathResources()` method in favor of
  `getResources()`.
* Deprecate the
  `EngineDiscoveryRequestResolver.Builder.addResourceContainerSelectorResolver(Predicate)`
  method in favor of `addResourceContainerSelectorResolver(ResourceFilter)`.
* Deprecate `Resource`-related methods in `ClasspathScanner` in favor of new methods using
  `org.junit.platform.commons.io.Resource` and `ResourceFilter`:
  - `scanForResourcesInPackage(String, Predicate)`
  - `scanForResourcesInClasspathRoot(URI, Predicate)`

[[v5.14.0-junit-platform-new-features-and-improvements]]
==== New Features and Improvements

* Emit discovery warning when `@SuiteDisplayName` is used with a blank string.
* To help diagnosing potentially invalid invocations, the Console Launcher now logs
  warnings for nonexistent classpath roots added via `--classpath` or `--scan-classpath`
  rather than silently ignoring them.
* New classpath resource abstraction in `org.junit.platform.commons.io.Resource` with
  support for loading resources or finding them on the classpath via static utility
  methods in the new `org.junit.platform.commons.support.ResourceSupport` class.
* New `Resource.of(String, URI)` static factory method for creating an
  `org.junit.platform.commons.support.Resource`.
* New `FileSource.withPosition(FilePosition)` method to avoid the overhead of redundant
  canonicalization of files when using `FileSource.from(File, FilePosition)` with many
  different `FilePosition` instances for the same `File`.
* New classpath resource abstraction in `org.junit.platform.commons.io.Resource` with
  support for loading resources or finding them on the classpath via static utility
  methods in the new `org.junit.platform.commons.support.ResourceSupport` class.


[[v5.14.0-junit-jupiter]]
=== JUnit Jupiter

[[v5.14.0-junit-jupiter-deprecations-and-breaking-changes]]
==== Deprecations and Breaking Changes

* `MediaType.APPLICATION_JSON_UTF_8` is now deprecated in favor of using
  `MediaType.APPLICATION_JSON`, since the industry considers UTF-8 to be the implicit
  default encoding for the `application/json` media type.
* `org.junit.jupiter.api.extension.MediaType` is now deprecated in favor of the new
  `org.junit.jupiter.api.MediaType`.
* The `publishFile(...)` methods in `TestReporter` which accept an
  `org.junit.jupiter.api.extension.MediaType` are now deprecated in favor of new variants
  which accept an `org.junit.jupiter.api.MediaType`.
* The `publishFile(...)` method in `ExtensionContext` which accepts an
  `org.junit.jupiter.api.extension.MediaType` is now deprecated in favor of a new variant
  which accepts an `org.junit.jupiter.api.MediaType`.
* `org.junit.jupiter.params.support.ParameterInfo` is now deprecated in favor of the new
  `org.junit.jupiter.params.ParameterInfo`.

[[v5.14.0-junit-jupiter-new-features-and-improvements]]
==== New Features and Improvements

* `MediaType` now trims leading and trailing whitespace from a supplied `value`, `type`,
  or `subtype`.
* `MediaType` now eagerly rejects a _blank_ `value`, `type`, or `subtype`.


[[v5.14.0-junit-vintage]]
=== JUnit Vintage

No changes.
