1
- [[release-notes-5.10.0-M1 ]]
2
- == 5.10.0-M1
1
+ [[release-notes-5.10.0]]
2
+ == 5.10.0
3
3
4
- *Date of Release:* May 13, 2023
4
+ *Date of Release:* ❓
5
5
6
6
*Scope:*
7
7
12
12
* Dry-run mode for test execution
13
13
* New `NamespacedHierarchicalStore` for use in third-party test engines
14
14
* Stacktrace pruning to hide internal JUnit calls
15
+ * New `@SelectMethod` support in test `@Suite` classes.
15
16
* New `TempDirFactory` SPI for customizing how temporary directories are created
16
17
* Failure threshold for `@RepeatedTest`
17
18
* New convenience base classes for implementing `ArgumentsProvider` and `ArgumentConverter`
21
22
* Numerous bug fixes and minor improvements
22
23
23
24
For a complete list of all _closed_ issues and pull requests for this release, consult the
24
- link:{junit5-repo}+/milestone/65?closed=1+[5.10.0-M1] milestone page in the JUnit
25
+ link:{junit5-repo}+/milestone/65?closed=1+[5.10.0-M1],
26
+ link:{junit5-repo}+/milestone/69?closed=1+[5.10.0-RC1], and
27
+ link:{junit5-repo}+/milestone/70?closed=1+[5.10.0 GA] milestone pages in the JUnit
25
28
repository on GitHub.
26
29
27
30
28
- [[release-notes-5.10.0-M1- junit-platform]]
31
+ [[release-notes-5.10.0-junit-platform]]
29
32
=== JUnit Platform
30
33
31
34
==== Deprecations and Breaking Changes
32
35
33
36
* Building native images with GraalVM now requires configuring the build arg
34
37
`--initialize-at-build-time=org.junit.platform.launcher.core.LauncherConfig` and
35
38
`--initialize-at-build-time=org.junit.jupiter.engine.config.InstantiatingConfigurationParameterConverter`.
39
+ * The `getMethodParameterTypes()` methods in `MethodSelector` and `NestedMethodSelector`
40
+ have been deprecated and replaced by `getParameterTypeNames()` for greater clarity.
36
41
37
42
==== New Features and Improvements
38
43
39
- * Promote various "experimental" APIs that have matured to "stable" including
44
+ * Various "experimental" APIs have been promoted to "stable", including
40
45
`ModuleSelector`, `EngineDiscoveryListener`, `EngineDiscoveryRequestResolver`,
41
46
`LauncherSession`, `LauncherSessionListener`, parallel execution support classes,
42
47
`@Suite` and related annotations, and others.
@@ -49,10 +54,17 @@ repository on GitHub.
49
54
`ClassLoader`. This allows parameter types to be resolved with custom `ClassLoader`
50
55
arrangements (such as OSGi). Consequently, `DiscoverySelectors.selectMethod(Class<?>,
51
56
String, String)` also now works properly with custom `ClassLoader` arrangements.
57
+
58
+ * New `@SelectMethod` selector support in the `@Suite` test engine.
59
+ * Classes may now be selected by fully-qualified name via the `names` attribute in
60
+ `@SelectClasses`.
52
61
* New overloaded constructors for `ClassSelector`, `NestedClassSelector`,
53
62
`MethodSelector`, and `NestedMethodSelector` that take an explicit `ClassLoader` as a
54
63
parameter, allowing selectors to select classes in custom `ClassLoader` arrangements
55
64
like in OSGi.
65
+ * New `selectMethod()` and `selectNestedMethod()` variants in `DiscoverySelectors` that
66
+ accept a `Class<?>...` argument of parameter types as a type-safe alternative to
67
+ providing the names of parameter types as a comma-delimited string.
56
68
* For consistency with JUnit Jupiter lifecycle callbacks, listener method pairs for
57
69
started/finished and opened/closed events are now invoked using "wrapping" semantics.
58
70
This means that finished/closed event methods are invoked in reverse order compared to
@@ -80,12 +92,13 @@ repository on GitHub.
80
92
* New dry-run mode to simulate test execution without actually running tests. Please refer
81
93
to the <<../user-guide/index.adoc#launcher-api-dry-run-mode, User Guide>> for details.
82
94
* Stack traces produced by failing tests are now pruned of calls from the `org.junit`,
83
- `java `, and `jdk ` packages by default . This feature can be disabled or configured to
84
- prune other calls via configurations parameters . Please refer to the
95
+ `jdk.internal.reflect `, and `sun.reflect ` packages. This feature can be disabled via a
96
+ configuration parameter . Please refer to the
85
97
<<../user-guide/index.adoc#stacktrace-pruning, User Guide>> for details.
98
+ * New `getAncestors()` method in `TestDescriptor`.
86
99
87
100
88
- [[release-notes-5.10.0-M1- junit-jupiter]]
101
+ [[release-notes-5.10.0-junit-jupiter]]
89
102
=== JUnit Jupiter
90
103
91
104
==== Bug Fixes
@@ -105,43 +118,55 @@ repository on GitHub.
105
118
default.
106
119
* Implicit type conversion of boolean values like in `@CsvSource` is now stricter, only
107
120
allowing values `"true"` or `"false"` (case-insensitive), in order to make accidental
108
- mistakes apparent, avoiding potential confusion.
121
+ mistakes apparent and to avoid potential confusion.
109
122
110
123
==== New Features and Improvements
111
124
112
- * Promote various "experimental" APIs that have matured to "stable" including
125
+ * Various "experimental" APIs have been promoted to "stable", including
113
126
`MethodOrderer`, `ClassOrderer`, `InvocationInterceptor`,
114
127
`LifecycleMethodExecutionExceptionHandler`, `@TempDir`, parallel execution annotations,
115
128
and others.
129
+ * `JAVA_22` has been added to the `JRE` enum for use with JRE-based execution conditions.
130
+ * New `reason` attribute in `@Execution` which can be used to document the reason for
131
+ using the selected execution mode.
132
+ * New `junit.jupiter.execution.parallel.config.dynamic.max-pool-size-factor` configuration
133
+ parameter to set the maximum pool size factor.
134
+ * New `junit.jupiter.execution.parallel.config.dynamic.saturate` configuration
135
+ parameter to disable pool saturation.
116
136
* `@RepeatedTest` can now be configured with a failure threshold which signifies the
117
137
number of failures after which remaining repetitions will be automatically skipped. See
118
138
the <<../user-guide/index.adoc#writing-tests-repeated-tests, User Guide>> for details.
119
- * New `ArgumentsAccessor.getInvocationIndex()` method that supplies the index of a
120
- `@ParameterizedTest` invocation.
139
+ * If `@MethodSource` is used with a non-static factory method that should be `static`, the
140
+ exception thrown now provides the user a meaningful explanation of how to address the
141
+ problem.
121
142
* `@EmptySource` now supports additional types, including `Collection` and `Map` subtypes
122
143
with a public no-arg constructor.
123
- * `DisplayNameGenerator` methods are now allowed to return `null`, in order to signal to
124
- fall back to the default display name generator .
144
+ * New `ArgumentsAccessor.getInvocationIndex()` method that supplies the index of a
145
+ `@ParameterizedTest` invocation .
125
146
* New `AnnotationBasedArgumentsProvider` convenience base class which implements both
126
147
`ArgumentsProvider` and `AnnotationConsumer`.
127
148
* New `AnnotationBasedArgumentConverter` convenience base class which implements both
128
149
`ArgumentConverter` and `AnnotationConsumer`.
129
- * New `junit.jupiter.execution.parallel.config.dynamic.max-pool-size-factor` configuration
130
- parameter to set the maximum pool size factor.
131
- * New `junit.jupiter.execution.parallel.config.dynamic.saturate` configuration
132
- parameter to disable pool saturation.
150
+ * `@TempDir` can now be used as a meta-annotation in order to create custom _composed
151
+ annotations_. See the `@JimfsTempDir` example in the
152
+ <<../user-guide/index.adoc#writing-tests-built-in-extensions-TempDirectory, User Guide>>
153
+ for details.
154
+ * `@TempDir` now successfully cleans up files and directories on Windows that are set to
155
+ read-only.
133
156
* New `TempDirFactory` SPI for customizing how the `@TempDir` extension creates temporary
134
157
directories. See the
135
158
<<../user-guide/index.adoc#writing-tests-built-in-extensions-TempDirectory, User Guide>>
136
159
for details.
137
- * New `junit.jupiter.tempdir.factory.default` configuration parameter to set the default
138
- `TempDirFactory` for temporary directories.
139
- * If `@MethodSource` is used with a non-static factory method that should be `static`, the
140
- exception thrown now provides the user a meaningful explanation of how to address the
141
- problem.
160
+ * The <<../user-guide/index.adoc#extensions-RandomNumberExtension, User Guide>> now
161
+ includes an example implementation of the `RandomNumberExtension` in order to improve
162
+ the documentation for extension registration via `@ExtendWith` on fields.
163
+ * The scope of applicability for `TestWatcher` implementations is now more extensively
164
+ documented in the User Guide and Javadoc.
165
+ * `DisplayNameGenerator` methods are now allowed to return `null`, in order to signal to
166
+ fall back to the default display name generator.
142
167
143
168
144
- [[release-notes-5.10.0-M1- junit-vintage]]
169
+ [[release-notes-5.10.0-junit-vintage]]
145
170
=== JUnit Vintage
146
171
147
172
No changes.
0 commit comments