1
1
[[release-notes-5.9.0]]
2
2
== 5.9.0
3
3
4
- *Date of Release:* ❓
4
+ *Date of Release:* July 26, 2022
5
5
6
- *Scope:* ❓
6
+ *Scope:*
7
+
8
+ * XML reports in new https://github.com/ota4j-team/open-test-reporting[Open Test Reporting]
9
+ format
10
+ * Configurable cleanup mode for `@TempDir`
11
+ * Configurable thread mode for `@Timeout`
12
+ * Conditional execution based on OS architectures
13
+ * New `TestInstancePreConstructCallback` extension API
14
+ * Reusable parameter resolution for custom extension methods via `ExecutableInvoker`
15
+ * Parameter injection for `@MethodSource` methods
16
+ * New `IterationSelector`
17
+ * Various improvements to `ConsoleLauncher`
7
18
8
19
For a complete list of all _closed_ issues and pull requests for this release, consult the
9
20
link:{junit5-repo}+/milestone/62?closed=1+[5.9.0] milestone page in the JUnit repository on
@@ -15,46 +26,121 @@ GitHub.
15
26
16
27
==== Bug Fixes
17
28
18
- * ❓
29
+ * Fixed handling of global post-discovery filters that apply to `@Suite` classes.
30
+ * Since the Turkish language has special characters such as 'ı' and 'İ', the uppercase
31
+ conversion in `DefaultParallelExecutionConfigurationStrategy#getStrategy` previously
32
+ caused all tests to finish with exit code -1. This has been fixed by using the root
33
+ locale instead of the default one.
34
+ * Absolute path entries are now supported in JUnit's Platform Console Launcher on Windows.
35
+ * Attempts to load a `Class` for an invalid class name representing an extremely large
36
+ multidimensional array now fail within a reasonable amount of time.
37
+ * Fix concurrency issue in classpath scanning.
19
38
20
39
==== Deprecations and Breaking Changes
21
40
22
- * ❓
41
+ * `ConfigurationParameters.size()` has been deprecated in favor of the new `keySet()`
42
+ method.
23
43
24
44
==== New Features and Improvements
25
45
26
- * ❓
46
+ * Support for the https://github.com/ota4j-team/open-test-reporting[Open Test Reporting]
47
+ format which supports all features of the JUnit Platform such as hierarchical test
48
+ structures, display names, tags, etc. Please refer to the
49
+ <<../user-guide/index.adoc#junit-platform-reporting-open-test-reporting, User Guide>>
50
+ for instructions on how to enable such reports in your build.
51
+ * `ConfigurationParameters` has a new `keySet()` method which allows you to retrieve all
52
+ configuration parameter keys.
53
+ * New `IterationSelector` for selecting a subset of a test's or container's iterations.
54
+ * `ParallelExecutionConfiguration` allows configuring the `saturate` predicate of the
55
+ `ForkJoinPool` used for parallel test execution.
56
+ * JUnit OSGi bundles now contain `engine` and `launcher` requirements ensuring that at
57
+ resolution time a fully running set of dependencies is calculated, avoiding the need for
58
+ these to be manually specified.
59
+ * JUnit Platform Standalone Console JAR now also includes the JUnit Platform Suite Engine.
60
+ * New `failIfNoTests` attribute added to `@Suite`. This will fail the suite if no tests
61
+ are discovered.
62
+ * The output color for the `ConsoleLauncher` can now be customized. The option
63
+ `--single-color` will apply a built-in monochrome style, while `--color-palette` will
64
+ accept a properties file. See the
65
+ <<../user-guide/index.adoc#running-tests-console-launcher-color-customization,
66
+ User Guide>> for details.
67
+ * The default theme for the `ConsoleLauncher` is now determined by the charset reported by
68
+ the system console on Java 17 and later.
69
+ * New `--list-engines` option added to the `ConsoleLauncher` which displays all registered
70
+ test engine implementations.
71
+ * Configuring included `EngineFilters` that do not match any registered `TestEngine`
72
+ results in an error to avoid misconfiguration – for example, due to typos.
73
+ * New public factory method to instantiate an `ExecutionRequest`.
74
+ * Documentation for overriding the JUnit version used in Spring Boot applications. See the
75
+ <<../user-guide/index.adoc#running-tests-build-spring-boot, User Guide>> for details.
27
76
28
77
29
78
[[release-notes-5.9.0-junit-jupiter]]
30
79
=== JUnit Jupiter
31
80
32
81
==== Bug Fixes
33
82
34
- * ❓
83
+ * When cleaning up a `@TempDir`, only one retry attempt will be made to delete directories.
84
+ * Since the Turkish language has special characters such as 'ı' and 'İ', the uppercase
85
+ conversion in `DefaultParallelExecutionConfigurationStrategy#getStrategy` previously
86
+ caused all tests to finish with exit code -1. This has been fixed by using the root
87
+ locale instead of the default one.
35
88
36
89
==== Deprecations and Breaking Changes
37
90
38
- * ❓
91
+ * `@TempDir` fields are no longer allowed to be declared as `final`.
92
+ - This improves diagnostics for failures resulting from a user-declared `static final`
93
+ `@TempDir` field by throwing an exception with an informative error message.
94
+ * Private lifecycle methods (annotated with `@BeforeAll`, `@AfterAll`, `@BeforeEach`, or
95
+ `@AfterEach`) now correctly lead to an exception. Although this is a bug fix, it is
96
+ technically also a breaking change since there might be existing user code with
97
+ `private` lifecycle methods which will now start to fail.
39
98
40
99
==== New Features and Improvements
41
100
101
+ * `@TempDir` now includes a `cleanup` mode attribute for preventing a temporary directory
102
+ from being deleted after a test. The default cleanup mode can be configured via a
103
+ configuration parameter.
104
+ * Support for FreeBSD and OpenBSD operating systems in `@EnabledOnOs` and `@DisabledOnOs`.
105
+ * New `MATCH_NONE` mode for `@EnumSource` that selects only those enum constants whose
106
+ names match none of the supplied patterns.
107
+ * The `@Order` annotation is now a `STABLE` API.
108
+ * New `TestInstancePreConstructCallback` extension API that is called prior to test
109
+ instance construction – symmetric to the existing `TestInstancePreDestroyCallback`
110
+ extension API.
111
+ * Extensions can now leverage registered `ParameterResolver` extensions when invoking
112
+ methods and constructors via the new `ExecutableInvoker` API available in the
113
+ `ExtensionContext`.
114
+ * A subset of the invocations of parameterized or dynamic tests can now be selected via
115
+ the new `IterationSelector` discovery selector when launching the JUnit Platform.
116
+ * `JAVA_19` and `JAVA_20` have been added to the `JRE` enum for use with JRE-based
117
+ execution conditions.
118
+ * `@MethodSource` factory methods can now accept arguments resolved by registered
119
+ `ParameterResolver` extensions.
42
120
* `AssertionFailureBuilder` allows reusing Jupiter's logic for creating failure messages
43
121
to assist in writing custom assertion methods.
122
+ * Three new `abort` methods have been added to the `Assumptions` class. These are
123
+ analogous to the `fail` methods in the `Assertions` class, but instead of failing they
124
+ abort the test or container.
125
+ * Support for enabling/disabling tests based on the system's hardware architecture via new
126
+ `architectures` attributes in `@EnabledOnOs` and `@DisabledOnOs`.
127
+ * Default `@MethodSource` factory methods can now accept arguments. A _default_ factory
128
+ method is a method declared in the test class with the same name as the
129
+ `@ParameterizedTest` method that is inferred as the factory method when no explicit
130
+ factory method is specified in the `@MethodSource` annotation.
131
+ * Thread mode can be set on `@Timeout` annotation. It allows to configure whether test
132
+ code is executed in the thread of the calling code or in a separate thread. The three
133
+ modes are: `INFERRED` (default) which resolves the thread mode configured via the
134
+ property `junit.jupiter.execution.timeout.thread.mode.default`, `SAME_THREAD` that
135
+ executes the test code in the same thread as the calling code, and `SEPARATE_THREAD`
136
+ which executes it in a separate thread.
44
137
45
138
46
139
[[release-notes-5.9.0-junit-vintage]]
47
140
=== JUnit Vintage
48
141
49
- ==== Bug Fixes
50
-
51
- * ❓
52
-
53
- ==== Deprecations and Breaking Changes
54
-
55
- * ❓
56
-
57
142
==== New Features and Improvements
58
143
59
144
* More accurate reporting of intermediate start/finish events, e.g. iterations of the
60
- `Parameterized` runner and classes executed indirectly via the `Suite` runner.
145
+ `Parameterized` runner and classes executed indirectly via the `Suite` runner, when
146
+ running with JUnit 4.13 or later.
0 commit comments