1
- [[release-notes-5.6.0-M1 ]]
2
- == 5.6.0-M1
1
+ [[release-notes-5.6.0]]
2
+ == 5.6.0
3
3
4
- *Date of Release:* October 21, 2019
4
+ *Date of Release:* January 20, 2020
5
5
6
6
*Scope:*
7
7
8
8
* New `@EnabledForJreRange` and `@DisabledForJreRange` execution conditions
9
9
* `@Order` allows to specify relative order
10
+ * Parameter names are included in default display names of parameterized test invocations
10
11
* Improvements to `@CsvSource` and `@CsvFileSource`
11
- * Improved error reporting for failures during test discovery and execution
12
+ * New `TestInstancePreDestroyCallback` extension API
12
13
* Performance improvements and bug fixes for the Vintage engine
14
+ * Improved error reporting for failures during test discovery and execution
15
+ * Support for using `any()` and `none()` in tag expressions
13
16
* `org.junit.platform.console` now provides a `java.util.spi.ToolProvider`
14
17
* `DiscoverySelectors` for tests in inherited nested classes
18
+ * OSGi metadata
19
+ * Minor bug fixes and improvements
15
20
16
21
For a complete list of all _closed_ issues and pull requests for this release, consult the
17
- link:{junit5-repo}+/milestone/39?closed=1+[5.6 M1] milestone page in the JUnit repository
18
- on GitHub.
22
+ link:{junit5-repo}+/milestone/39?closed=1+[5.6 M1],
23
+ link:{junit5-repo}+/milestone/45?closed=1+[5.6 RC1], and
24
+ link:{junit5-repo}+/milestone/46?closed=1+[5.6 GA]
25
+ milestone pages in the JUnit repository on GitHub.
19
26
20
27
21
- [[release-notes-5.6.0-M1- overall-improvements]]
28
+ [[release-notes-5.6.0-overall-improvements]]
22
29
=== Overall Improvements
23
30
24
31
* https://docs.gradle.org/6.0-rc-1/userguide/publishing_gradle_module_metadata.html[Gradle
25
32
Module Metadata] is now published for all artifacts.
33
+ * OSGi metadata is now published in all binary JARs.
26
34
27
35
28
- [[release-notes-5.6.0-M1- junit-platform]]
36
+ [[release-notes-5.6.0-junit-platform]]
29
37
=== JUnit Platform
30
38
31
39
==== Bug Fixes
32
40
41
+ * The `EventConditions.nestedContainer()` method in the Engine Test Kit now correctly
42
+ handles events from multiple levels of nested classes.
33
43
* Module `org.junit.platform.launcher` now reads `java.logging` due to usage of types in
34
44
package `java.util.logging`.
35
45
@@ -51,25 +61,36 @@ on GitHub.
51
61
52
62
==== New Features and Improvements
53
63
64
+ * Running all tests with any tags or without any tags at all is now supported
65
+ by using the special expressions `any()` and `none()`.
66
+ * `ReflectionSupport.findNestedClasses(...)` now detects cycles within inner class
67
+ hierarchies. Consult the Javadoc for details.
68
+ * New methods in `DiscoverySelectors` to select and execute individual tests in
69
+ inherited nested classes, via specific selectors (`NestedClassSelector` and
70
+ `NestedMethodSelector`).
54
71
* New `printFailuresTo(PrintWriter, int)` method in `TestExecutionSummary` that allows one
55
72
to specify the maximum number of lines to print for exception stack traces.
73
+ * `TestExecutionSummary.Failure` is now serializable.
74
+ * `ThrowableCollector.toTestExecutionResult()` is now public.
75
+ * Exceptions thrown by test engines during discovery and execution are now reported to
76
+ `TestExecutionListeners`.
56
77
* The `junit-platform-commons` module no longer has a dependency on the `java.compiler`
57
78
module (in terms of the Java Module System). Specifically, a new internal utility has
58
79
been introduced in `PackageUtils` that implements functionality equivalent to
59
80
`javax.lang.model.SourceVersion.isName(CharSequence)` from the `java.compiler` module.
60
- * Exceptions thrown by test engines during discovery and execution are now reported to
61
- `TestExecutionListeners`.
62
81
* Module `org.junit.platform.console` now provides a `java.util.spi.ToolProvider`
63
82
implementation that can be acquired by `ToolProvider.findFirst("junit")` when running
64
83
on Java 9 or above.
65
- * New methods in `DiscoverySelectors` to select and execute individual tests in
66
- inherited nested classes, via specific selectors (`NestedClassSelector` and
67
- `NestedMethodSelector`).
68
84
69
85
70
- [[release-notes-5.6.0-M1- junit-jupiter]]
86
+ [[release-notes-5.6.0-junit-jupiter]]
71
87
=== JUnit Jupiter
72
88
89
+ ==== Bug Fixes
90
+
91
+ * When `@Nested` is used, the temporary directory is now also injected into instance
92
+ fields of enclosing classes annotated with `@TempDir`.
93
+
73
94
==== Deprecations and Breaking Changes
74
95
75
96
* `@EnabledIf` and `@DisabledIf` have been removed from Jupiter's API. Script-based
@@ -88,8 +109,16 @@ on GitHub.
88
109
* Support for custom `null` values in `@CsvSource` and `@CsvFileSource`.
89
110
* Documented support for comments in CSV files loaded via `@CsvFileSource`.
90
111
* Auto-detection of enum type from method signature for `@EnumSource`.
112
+ * Parameter names are now included in the default display name of a `@ParameterizedTest`
113
+ invocation (if they are present in the bytecode). The `{argumentsWithNames}` pattern
114
+ can also be used in custom names.
91
115
* New `@EnabledForJreRange` and `@DisabledForJreRange` annotations for enabling or
92
116
disabling test execution over a range of JRE versions.
117
+ * `@EnabledIfEnvironmentVariable`, `@DisabledIfEnvironmentVariable`,
118
+ `@EnabledIfSystemProperty`, and `@DisabledIfSystemProperty` may now be used as
119
+ _repeatable_ annotations. In other words, it is now possible to declare each of those
120
+ annotations multiple times on a test interface, test class, or test method.
121
+ * `JAVA_15` has been added to the `JRE` enum for use with JRE-based execution conditions.
93
122
* The `@TempDir` extension now makes an attempt to delete non-writable files by making
94
123
them writable first.
95
124
* The default `@Order` value for non-annotated `@RegisterExtension` fields and test
@@ -101,12 +130,20 @@ on GitHub.
101
130
* New `junit.jupiter.execution.timeout.mode` configuration parameter to control whether
102
131
timeouts are applied to tests. Supported values include `enabled`, `disabled`, and
103
132
`disabled_on_debug`.
133
+ * New `TestInstancePreDestroyCallback` interface that defines the API for extensions that
134
+ wish to process test instances *after* they have been used in tests and *before* they
135
+ are destroyed.
104
136
* New `TypeBasedParameterResolver<T>` abstract base class that serves as a generic adapter
105
137
for the `ParameterResolver` API and simplifies the implementation of a custom resolver
106
138
that supports parameters of a specific type.
139
+ * `InvocationInterceptor` extensions may now explicitly `skip()` an intercepted
140
+ invocation. This allows executing the invocation by other means — for example, in a
141
+ forked JVM.
142
+ * Discovery of `@Nested` test classes that form a cycle now results in an exception that
143
+ halts execution of the JUnit Jupiter test engine instead of infinite recursion.
107
144
108
145
109
- [[release-notes-5.6.0-M1- junit-vintage]]
146
+ [[release-notes-5.6.0-junit-vintage]]
110
147
=== JUnit Vintage
111
148
112
149
==== Bug Fixes
@@ -115,5 +152,9 @@ on GitHub.
115
152
116
153
==== New Features and Improvements
117
154
155
+ * To support adoption of the recent JUnit 4.13 release, the Vintage engine now requires
156
+ the new version in its POM and Gradle Module Metadata. However, if you absolutely have
157
+ to stay on 4.12, you can safely downgrade the dependency manually because the Vintage
158
+ engine will remain compatible with 4.12.
118
159
* Performance improvements for projects with a large number of tests.
119
160
* Performance improvements for test classes with a large number of methods.
0 commit comments