Skip to content

Commit e572ab3

Browse files
committed
Write release-note and user-guide
Issue: #2229 Signed-off-by: yongjunhong <[email protected]>
1 parent fc7b9c0 commit e572ab3

File tree

3 files changed

+33
-4
lines changed

3 files changed

+33
-4
lines changed

documentation/src/docs/asciidoc/release-notes/release-notes-5.12.0-M1.adoc

+8-1
Original file line numberDiff line numberDiff line change
@@ -155,4 +155,11 @@ JUnit repository on GitHub.
155155
[[release-notes-5.12.0-M1-junit-vintage-new-features-and-improvements]]
156156
==== New Features and Improvements
157157

158-
* ❓
158+
* Introduced support for parallel execution in the JUnit Vintage engine.
159+
- Added the `junit.vintage.execution.parallel.enabled` property to enable or disable parallel execution.
160+
Defaults to `false`.
161+
- Added the `junit.vintage.execution.parallel.pool-size` property to configure the size of the thread pool used for
162+
parallel execution. Defaults to the number of available processors.
163+
- Enhanced the `VintageTestEngine` to respect these properties and execute tests in parallel when enabled.
164+
- Improved test execution performance by allowing multiple tests to run concurrently, reducing overall
165+
test suite execution time.

documentation/src/docs/asciidoc/user-guide/migration-from-junit4.adoc

+23
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,29 @@ annotated with `@Category(Example.class)`, it will be tagged with `"com.acme.Exa
3636
Similar to the `Categories` runner in JUnit 4, this information can be used to filter the
3737
discovered tests before executing them (see <<running-tests>> for details).
3838

39+
[[migrating-from-junit4-parallel-execution]]
40+
=== Parallel Execution Support in JUnit Vintage
41+
42+
JUnit Vintage now supports parallel execution of tests, allowing existing JUnit 3 and
43+
JUnit 4 tests to benefit from improved performance through concurrent test execution.
44+
45+
To enable parallel execution, set the `junit.vintage.execution.parallel.enabled` property
46+
to `true`. By default, this property is set to `false`.
47+
48+
You can also configure the size of the thread pool used for parallel execution by setting
49+
the `junit.vintage.execution.parallel.pool-size` property. By default, this property is
50+
set to the number of available processors.
51+
52+
Example configuration in `junit-platform.properties`:
53+
54+
[source,properties]
55+
----
56+
junit.vintage.execution.parallel.enabled=true
57+
junit.vintage.execution.parallel.pool-size=4
58+
----
59+
60+
With these properties set, the `VintageTestEngine` will execute tests in parallel,
61+
significantly reducing the overall test suite execution time.
3962

4063
[[migrating-from-junit4-tips]]
4164
=== Migration Tips

junit-vintage-engine/src/main/java/org/junit/vintage/engine/VintageTestEngine.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
package org.junit.vintage.engine;
1212

1313
import static org.apiguardian.api.API.Status.INTERNAL;
14-
import static org.apiguardian.api.API.Status.STABLE;
1514
import static org.junit.platform.engine.TestExecutionResult.successful;
1615
import static org.junit.vintage.engine.descriptor.VintageTestDescriptor.ENGINE_ID;
1716

@@ -61,7 +60,7 @@ public final class VintageTestEngine implements TestEngine {
6160
*
6261
* @since 5.12
6362
*/
64-
@API(status = STABLE, since = "5.12")
63+
@API(status = INTERNAL, since = "5.12")
6564
public static final String PARALLEL_EXECUTION_ENABLED = "junit.vintage.execution.parallel.enabled";
6665

6766
/**
@@ -73,7 +72,7 @@ public final class VintageTestEngine implements TestEngine {
7372
*
7473
* @since 5.12
7574
*/
76-
@API(status = STABLE, since = "5.12")
75+
@API(status = INTERNAL, since = "5.12")
7776
public static final String PARALLEL_POOL_SIZE = "junit.vintage.execution.parallel.pool-size";
7877

7978
@Override

0 commit comments

Comments
 (0)