Skip to content

Commit fb5e358

Browse files
committed
Polish Javadoc and User Guide regarding @⁠Suite support
(cherry picked from commit 569dbc7)
1 parent dac942c commit fb5e358

File tree

4 files changed

+31
-32
lines changed

4 files changed

+31
-32
lines changed

documentation/src/docs/asciidoc/user-guide/advanced-topics/junit-platform-suite-engine.adoc

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[[junit-platform-suite-engine]]
22
=== JUnit Platform Suite Engine
33

4-
The Suite Engine supports the declarative selection and execution of tests from
5-
_any_ test engine on the JUnit Platform using the <<launcher-api>>.
4+
The Suite Engine supports the declarative selection and execution of tests from _any_ test
5+
engine on the JUnit Platform using the <<launcher-api>>.
66

77
image::junit-platform-suite-engine-diagram.svg[role=text-center]
88

@@ -36,9 +36,9 @@ on `junit-platform-suite-api` and `junit-platform-suite-engine`.
3636
[[junit-platform-suite-engine-example]]
3737
==== @Suite Example
3838

39-
By annotating a class with `@Suite` it is marked as a test suite on the JUnit Platform.
40-
As seen in the following example, selector and filter annotations can then be used to
41-
control the contents of the suite.
39+
Annotate a class with `@Suite` to have it marked as a test suite on the JUnit Platform. As
40+
seen in the following example, selector and filter annotations can be used to control the
41+
contents of the suite.
4242

4343
[source,java,indent=0]
4444
----
@@ -53,26 +53,28 @@ list of supported annotations and further details.
5353
==== @BeforeSuite and @AfterSuite
5454

5555
`@BeforeSuite` and `@AfterSuite` annotations can be used on methods inside a
56-
`@Suite`-annotated class. They will be executed respectively before and after
57-
all tests of the test suite.
56+
`@Suite`-annotated class. They will be executed before and after all tests of the test
57+
suite, respectively.
5858

5959
[source,java,indent=0]
6060
----
6161
include::{testDir}/example/BeforeAndAfterSuiteDemo.java[tags=user_guide]
6262
----
6363

6464
[[junit-platform-suite-engine-duplicate-test-execution]]
65-
==== Duplicate test execution
65+
==== Duplicate Test Execution
6666

67-
Depending on the declared test selection, different suites may contain the same tests,
68-
potentially with different configurations.
69-
Moreover, tests in a suite are executed in addition to the tests executed by every other
70-
test engine. This can result in the same tests being executed twice.
67+
Depending on the declared selectors, different suites may contain the same tests,
68+
potentially with different configurations. Moreover, tests in a suite are executed in
69+
addition to the tests executed by every other test engine, which can result in the same
70+
tests being executed twice.
7171

7272
image::junit-platform-suite-engine-duplicate-test-execution-diagram.svg[role=text-center]
7373

74-
This can be prevented by configuring your build tool to only include the
75-
`junit-platform-suite` engine. Or by using a naming pattern. For example, name all suites
76-
`*Suite` and all tests `*Test` and configure your build tool to only include the former.
74+
To prevent duplicate execution of tests within a suite, configure your build tool to
75+
include only the `junit-platform-suite` engine, or use a custom naming pattern. For
76+
example, name all suites `*Suite` and all tests `*Test`, and configure your build tool to
77+
include only the former.
7778

78-
Alternatively, consider <<running-tests-tags, using tags>> to select specific groups of tests.
79+
Alternatively, consider <<running-tests-tags, using tags>> to select specific groups of
80+
tests.

documentation/src/docs/asciidoc/user-guide/advanced-topics/testkit.adoc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
=== JUnit Platform Test Kit
55

66
The `junit-platform-testkit` artifact provides support for executing a test plan on the
7-
JUnit Platform and then verifying the expected results. As of JUnit Platform
8-
{version}, this support is limited to the execution of a single `TestEngine` (see
9-
<<testkit-engine>>).
7+
JUnit Platform and then verifying the expected results. This support is currently limited
8+
to the execution of a single `TestEngine` (see <<testkit-engine>>).
109

1110
[[testkit-engine]]
1211
==== Engine Test Kit

documentation/src/plantuml/junit-platform-suite-engine-duplicate-test-execution-diagram.puml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ together {
2626
"Jupiter Test Engine (@Suite)" --> "Example Test A (@Suite)" : discovers and executes
2727

2828
"JUnit Platform" --> "Jupiter Test Engine": forwards request
29-
"Jupiter Test Engine" --> "Example Test A" #line:red;line.bold;text:red : also discover and executes!
29+
"Jupiter Test Engine" --> "Example Test A" #line:red;line.bold;text:red : also discovers and executes!
3030
@enduml

junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/Suite.java

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,17 @@
4141
* and the configuration parameters from the discovery request that discovered
4242
* the suite. Annotating a suite with
4343
* {@link DisableParentConfigurationParameters @DisableParentConfigurationParameters}
44-
* annotation disables the latter as a source of parameters so that only explicit
45-
* configuration parameters are taken into account.
44+
* disables the latter as a source of parameters so that only explicit configuration
45+
* parameters are taken into account.
4646
*
47-
* <p>Note: Depending on the declared test selection, different suites may contain the
48-
* same tests, potentially with different configurations.
49-
* Moreover, tests in a suite are executed in addition to the tests executed by every
50-
* other test engine. This can result in the same tests being executed twice and can be
51-
* prevented by configuring your build tool to only include the
52-
* {@code junit-platform-suite} engine. Or by using a naming pattern. For example, name
53-
* all suites {@code *Suite} and all tests {@code *Test} and configure your build tool
54-
* to only include the former.
55-
*
56-
* <p>Alternatively, consider using tags to select specific groups of tests.
47+
* <p>Note: Depending on the declared selectors, different suites may contain the
48+
* same tests, potentially with different configurations. Moreover, tests in a suite
49+
* are executed in addition to the tests executed by every other test engine, which
50+
* can result in the same tests being executed twice. To prevent that, configure
51+
* your build tool to include only the {@code junit-platform-suite} engine, or use
52+
* a custom naming pattern. For example, name all suites {@code *Suite} and all
53+
* tests {@code *Test}, and configure your build tool to include only the former.
54+
* Alternatively, consider using tags to select specific groups of tests.
5755
*
5856
* @since 1.8
5957
* @see Select

0 commit comments

Comments
 (0)