Skip to content

Commit 8546b97

Browse files
committed
Extract and update note to independent section
1 parent c0a8776 commit 8546b97

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

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

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ on `junit-platform-suite-api` and `junit-platform-suite-engine`.
3131
* `junit-platform-commons` in _test_ scope
3232
* `opentest4j` in _test_ scope
3333

34+
[[junit-platform-suite-engine-setup-duplicate-test-execution]]
35+
===== Duplicate test execution
36+
37+
Tests in a suite are executed in addition to the tests executed by every other test
38+
engine. This can result in the same tests being executed twice.
39+
40+
This can be prevented by configuring your build tool to only include the
41+
`junit-platform-suite` engine. Or by using a naming pattern. For example name all suites
42+
`*Suite` and all tests `*Test` and configure your build tool to only include the former.
43+
44+
Alternatively, consider <<running-tests-tags, using tags>> to select specific groups of tests.
45+
3446
[[junit-platform-suite-engine-example]]
3547
==== @Suite Example
3648

@@ -48,13 +60,6 @@ NOTE: There are numerous configuration options for discovering and filtering tes
4860
test suite. Please consult the Javadoc of the `{suite-api-package}` package for a full
4961
list of supported annotations and further details.
5062

51-
.Duplicate test execution
52-
NOTE: Tests in a suite are executed in addition to the tests executed by every other test
53-
engine, so it is possible to for the same test to be executed twice. A common solution is
54-
to use a naming pattern. Name all suites `*Suite` and all tests `*Test` and configure your
55-
build tool to only include the former. Alternatively, consider
56-
<<running-tests-tags, using tags>> to select specific groups of tests.
57-
5863
==== @BeforeSuite and @AfterSuite
5964

6065
`@BeforeSuite` and `@AfterSuite` annotations can be used on methods inside a

0 commit comments

Comments
 (0)