File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
documentation/src/docs/asciidoc/user-guide/advanced-topics
junit-platform-suite-api/src/main/java/org/junit/platform/suite/api Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 11[[junit-platform-suite-engine]]
22=== JUnit Platform Suite Engine
33
4- The JUnit Platform supports the declarative definition and execution of suites of tests
5- from _any_ test engine using the JUnit Platform.
4+ The Suite Engine supports the declarative selection and execution of tests from
5+ _any_ test engine using the JUnit Platform.
66
77[[junit-platform-suite-engine-setup]]
88==== Setup
@@ -48,6 +48,13 @@ NOTE: There are numerous configuration options for discovering and filtering tes
4848test suite. Please consult the Javadoc of the `{suite-api-package}` package for a full
4949list of supported annotations and further details.
5050
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+
5158==== @BeforeSuite and @AfterSuite
5259
5360`@BeforeSuite` and `@AfterSuite` annotations can be used on methods inside a
Original file line number Diff line number Diff line change 2626 * {@code @Suite} marks a class as a test suite on the JUnit Platform.
2727 *
2828 * <p>Selector and filter annotations are used to control the contents of the
29- * suite. Additionally configuration can be passed to the suite via the
29+ * suite. Additionally, configuration can be passed to the suite via the
3030 * configuration annotations.
3131 *
3232 * <p>When the {@link IncludeClassNamePatterns @IncludeClassNamePatterns}
4444 * annotation disables the latter as a source of parameters so that only explicit
4545 * configuration parameters are taken into account.
4646 *
47+ * <p>Note: Tests in a suite are executed in addition to the tests executed by every
48+ * other test engine, so it is possible to for the same test to be executed twice. A
49+ * common solution is to use a naming pattern. Name all suites {@code *Suite} and all
50+ * tests {@code *Test} and configure your build tool to only include the former.
51+ * Alternatively, consider using tags to select specific groups of tests.
52+ *
4753 * @since 1.8
4854 * @see Select
4955 * @see SelectClasses
You can’t perform that action at this time.
0 commit comments