AMLSim
/
jars
/junit5-r5.10.2
/documentation
/src
/docs
/asciidoc
/user-guide
/advanced-topics
/junit-platform-suite-engine.adoc
=== JUnit Platform Suite Engine | |
The JUnit Platform supports the declarative definition and execution of suites of tests | |
from _any_ test engine using the JUnit Platform. | |
==== Setup | |
In addition to the `junit-platform-suite-api` and `junit-platform-suite-engine` artifacts, | |
you need _at least one_ other test engine and its dependencies on the classpath. See | |
<<dependency-metadata>> for details regarding group IDs, artifact IDs, and versions. | |
===== Required Dependencies | |
* `junit-platform-suite-api` in _test_ scope: artifact containing annotations needed to | |
configure a test suite | |
* `junit-platform-suite-engine` in _test runtime_ scope: implementation of the | |
`TestEngine` API for declarative test suites | |
NOTE: Both of the required dependencies are aggregated in the `junit-platform-suite` | |
artifact which can be declared in _test_ scope instead of declaring explicit dependencies | |
on `junit-platform-suite-api` and `junit-platform-suite-engine`. | |
===== Transitive Dependencies | |
* `junit-platform-suite-commons` in _test_ scope | |
* `junit-platform-launcher` in _test_ scope | |
* `junit-platform-engine` in _test_ scope | |
* `junit-platform-commons` in _test_ scope | |
* `opentest4j` in _test_ scope | |
==== @Suite Example | |
By annotating a class with `@Suite` it is marked as a test suite on the JUnit Platform. | |
As seen in the following example, selector and filter annotations can then be used to | |
control the contents of the suite. | |
---- | |
include::{testDir}/example/SuiteDemo.java[tags=user_guide] | |
---- | |
.Additional Configuration Options | |
NOTE: There are numerous configuration options for discovering and filtering tests in a | |
test suite. Please consult the Javadoc of the `{suite-api-package}` package for a full | |
list of supported annotations and further details. | |