|
21 | 21 | * Improved configurability of parallel execution
|
22 | 22 | * Numerous bug fixes and minor improvements
|
23 | 23 |
|
24 |
| -For a complete list of all _closed_ issues and pull requests for this release, consult the |
25 |
| -link:{junit5-repo}+/milestone/65?closed=1+[5.10.0-M1], |
26 |
| -link:{junit5-repo}+/milestone/69?closed=1+[5.10.0-RC1], |
27 |
| -link:{junit5-repo}+/milestone/71?closed=1+[5.10.0-RC2], and |
28 |
| -link:{junit5-repo}+/milestone/70?closed=1+[5.10.0 GA] milestone pages in the JUnit |
29 |
| -repository on GitHub. |
30 |
| - |
31 |
| - |
32 |
| -[[release-notes-5.10.0-junit-platform]] |
33 |
| -=== JUnit Platform |
34 |
| - |
35 |
| -==== Deprecations and Breaking Changes |
36 |
| - |
37 |
| -* Building native images with GraalVM now requires configuring the build arg |
38 |
| - `--initialize-at-build-time=org.junit.platform.launcher.core.LauncherConfig` and |
39 |
| - `--initialize-at-build-time=org.junit.jupiter.engine.config.InstantiatingConfigurationParameterConverter`. |
40 |
| -* The `getMethodParameterTypes()` methods in `MethodSelector` and `NestedMethodSelector` |
41 |
| - have been deprecated and replaced by `getParameterTypeNames()` for greater clarity. |
42 |
| - |
43 |
| -==== New Features and Improvements |
44 |
| - |
45 |
| -* Various "experimental" APIs have been promoted to "stable", including |
46 |
| - `ModuleSelector`, `EngineDiscoveryListener`, `EngineDiscoveryRequestResolver`, |
47 |
| - `LauncherSession`, `LauncherSessionListener`, parallel execution support classes, |
48 |
| - `@Suite` and related annotations, and others. |
49 |
| -* All utility methods in `ReflectionSupport` that return a `List` now have counterparts |
50 |
| - which return a `Stream`. |
51 |
| -* New `tryToLoadClass(...)` variant in `ReflectionSupport` that accepts an explicit |
52 |
| - `ClassLoader`, allowing classes to be resolved with custom `ClassLoader` arrangements. |
53 |
| -* `ReflectionSupport.findMethod(Class<?>, String, String)` now uses the `ClassLoader` of |
54 |
| - the supplied `Class` to load parameter types instead of using the _default_ |
55 |
| - `ClassLoader`. This allows parameter types to be resolved with custom `ClassLoader` |
56 |
| - arrangements (such as OSGi). Consequently, `DiscoverySelectors.selectMethod(Class<?>, |
57 |
| - String, String)` also now works properly with custom `ClassLoader` arrangements. |
58 |
| - |
59 |
| -* New `@SelectMethod` selector support in the `@Suite` test engine. |
60 |
| -* Classes may now be selected by fully-qualified name via the `names` attribute in |
61 |
| - `@SelectClasses`. |
62 |
| -* New overloaded constructors for `ClassSelector`, `NestedClassSelector`, |
63 |
| - `MethodSelector`, and `NestedMethodSelector` that take an explicit `ClassLoader` as a |
64 |
| - parameter, allowing selectors to select classes in custom `ClassLoader` arrangements |
65 |
| - like in OSGi. |
66 |
| -* New `selectMethod()` and `selectNestedMethod()` variants in `DiscoverySelectors` that |
67 |
| - accept a `Class<?>...` argument of parameter types as a type-safe alternative to |
68 |
| - providing the names of parameter types as a comma-delimited string. |
69 |
| -* For consistency with JUnit Jupiter lifecycle callbacks, listener method pairs for |
70 |
| - started/finished and opened/closed events are now invoked using "wrapping" semantics. |
71 |
| - This means that finished/closed event methods are invoked in reverse order compared to |
72 |
| - the corresponding started/opened event methods when multiple listeners are registered. |
73 |
| - This affects the following listener interfaces: |
74 |
| - `TestExecutionListener`, `EngineExecutionListener`, `LauncherDiscoveryListener`, and |
75 |
| - `LauncherSessionListener`. |
76 |
| -* New `LauncherInterceptor` SPI for intercepting the creation of instances of `Launcher` |
77 |
| - and `LauncherSessionlistener` as well as invocations of the `discover` and `execute` |
78 |
| - methods of the former. Please refer to the |
79 |
| - <<../user-guide/index.adoc#launcher-api-launcher-interceptors-custom, User Guide>> for |
80 |
| - details. |
81 |
| -* Support for limiting the `max-pool-size-factor` for parallel execution via a |
82 |
| - configuration parameter. |
83 |
| -* New `testfeed` details mode for `ConsoleLauncher` that prints test execution events as |
84 |
| - they occur in a concise format. |
85 |
| -* The existing functionality of the `ConsoleLauncher` has been split into two subcommands: |
86 |
| - `execute` for executing tests and `engines` for listing registered test engines. |
87 |
| -* A new `discover` subcommand has been added to the `ConsoleLauncher` to print the |
88 |
| - discovered tests for the specified details mode without executing them. |
89 |
| -* Improved error message for cyclic graphs detected during test discovery to be more |
90 |
| - actionable. |
91 |
| -* Extracted `NamespacedHierarchicalStore` from JUnit Jupiter engine for reuse by other |
92 |
| - test engines and their extensions. |
93 |
| -* New dry-run mode to simulate test execution without actually running tests. Please refer |
94 |
| - to the <<../user-guide/index.adoc#launcher-api-dry-run-mode, User Guide>> for details. |
95 |
| -* Stack traces produced by failing tests are now pruned of calls from the `org.junit`, |
96 |
| - `jdk.internal.reflect`, and `sun.reflect` packages. This feature can be disabled via a |
97 |
| - configuration parameter. Please refer to the |
98 |
| - <<../user-guide/index.adoc#stacktrace-pruning, User Guide>> for details. |
99 |
| -* New `getAncestors()` method in `TestDescriptor`. |
100 |
| - |
101 |
| - |
102 |
| -[[release-notes-5.10.0-junit-jupiter]] |
103 |
| -=== JUnit Jupiter |
104 |
| - |
105 |
| -==== Bug Fixes |
106 |
| - |
107 |
| -* The extensions supporting `@MethodSource`, `@EnabledIf`, and `@DisabledIf` now load |
108 |
| - classes by fully-qualified class name using the `ClassLoader` obtained from the test |
109 |
| - class when possible. This allows classes to be resolved with custom `ClassLoader` |
110 |
| - arrangements (such as OSGi). |
111 |
| -* When converting an argument for a `@ParameterizedTest` method from a fully-qualified |
112 |
| - class name (`String`) to a `Class`, the `ClassLoader` of the class in which the |
113 |
| - `@ParameterizedTest` method is declared is now used to resolve the `Class` instead of |
114 |
| - the _default_ `ClassLoader`. |
115 |
| - |
116 |
| -==== Deprecations and Breaking Changes |
117 |
| - |
118 |
| -* The `dynamic` parallel execution strategy now allows the thread pool to be saturated by |
119 |
| - default. |
120 |
| -* Implicit type conversion of boolean values like in `@CsvSource` is now stricter, only |
121 |
| - allowing values `"true"` or `"false"` (case-insensitive), in order to make accidental |
122 |
| - mistakes apparent and to avoid potential confusion. |
123 |
| - |
124 |
| -==== New Features and Improvements |
125 |
| - |
126 |
| -* Various "experimental" APIs have been promoted to "stable", including |
127 |
| - `MethodOrderer`, `ClassOrderer`, `InvocationInterceptor`, |
128 |
| - `LifecycleMethodExecutionExceptionHandler`, `@TempDir`, parallel execution annotations, |
129 |
| - and others. |
130 |
| -* `JAVA_22` has been added to the `JRE` enum for use with JRE-based execution conditions. |
131 |
| -* New `reason` attribute in `@Execution` which can be used to document the reason for |
132 |
| - using the selected execution mode. |
133 |
| -* New `junit.jupiter.execution.parallel.config.dynamic.max-pool-size-factor` configuration |
134 |
| - parameter to set the maximum pool size factor. |
135 |
| -* New `junit.jupiter.execution.parallel.config.dynamic.saturate` configuration |
136 |
| - parameter to disable pool saturation. |
137 |
| -* `@RepeatedTest` can now be configured with a failure threshold which signifies the |
138 |
| - number of failures after which remaining repetitions will be automatically skipped. See |
139 |
| - the <<../user-guide/index.adoc#writing-tests-repeated-tests, User Guide>> for details. |
140 |
| -* If `@MethodSource` is used with a non-static factory method that should be `static`, the |
141 |
| - exception thrown now provides the user a meaningful explanation of how to address the |
142 |
| - problem. |
143 |
| -* `@EmptySource` now supports additional types, including `Collection` and `Map` subtypes |
144 |
| - with a public no-arg constructor. |
145 |
| -* New `ArgumentsAccessor.getInvocationIndex()` method that supplies the index of a |
146 |
| - `@ParameterizedTest` invocation. |
147 |
| -* New `AnnotationBasedArgumentsProvider` convenience base class which implements both |
148 |
| - `ArgumentsProvider` and `AnnotationConsumer`. |
149 |
| -* New `AnnotationBasedArgumentConverter` convenience base class which implements both |
150 |
| - `ArgumentConverter` and `AnnotationConsumer`. |
151 |
| -* `@TempDir` can now be used as a meta-annotation in order to create custom _composed |
152 |
| - annotations_. See the `@JimfsTempDir` example in the |
153 |
| - <<../user-guide/index.adoc#writing-tests-built-in-extensions-TempDirectory, User Guide>> |
154 |
| - for details. |
155 |
| -* `@TempDir` now successfully cleans up files and directories on Windows that are set to |
156 |
| - read-only. |
157 |
| -* New `TempDirFactory` SPI for customizing how the `@TempDir` extension creates temporary |
158 |
| - directories. See the |
159 |
| - <<../user-guide/index.adoc#writing-tests-built-in-extensions-TempDirectory, User Guide>> |
160 |
| - for details. |
161 |
| -* The <<../user-guide/index.adoc#extensions-RandomNumberExtension, User Guide>> now |
162 |
| - includes an example implementation of the `RandomNumberExtension` in order to improve |
163 |
| - the documentation for extension registration via `@ExtendWith` on fields. |
164 |
| -* The scope of applicability for `TestWatcher` implementations is now more extensively |
165 |
| - documented in the User Guide and Javadoc. |
166 |
| -* `DisplayNameGenerator` methods are now allowed to return `null`, in order to signal to |
167 |
| - fall back to the default display name generator. |
168 |
| - |
169 |
| - |
170 |
| -[[release-notes-5.10.0-junit-vintage]] |
171 |
| -=== JUnit Vintage |
172 |
| - |
173 |
| -No changes. |
| 24 | +For complete details consult the |
| 25 | +https://junit.org/junit5/docs/5.10.0/release-notes/index.html[5.10.0 Release Notes] online. |
0 commit comments