@@ -4,9 +4,9 @@ A `TestEngine` facilitates _discovery_ and _execution_ of tests for a particular
44programming model.
55
66For example, JUnit provides a `TestEngine` that discovers and executes tests written using
7- the JUnit Jupiter programming model (see << writing-tests>> and << extensions>> ).
7+ the JUnit Jupiter programming model (see xref: writing-tests/intro.adoc[] and xref: extensions/overview.adoc[] ).
88
9- [[test-engines- junit]]
9+ [[junit]]
1010== JUnit Test Engines
1111
1212JUnit provides three `TestEngine` implementations.
@@ -17,7 +17,7 @@ JUnit provides three `TestEngine` implementations.
1717* `{junit-platform-suite-engine}`: Executes declarative suites of tests with the JUnit
1818 Platform launcher infrastructure.
1919
20- [[test-engines- custom]]
20+ [[custom]]
2121== Custom Test Engines
2222
2323You can contribute your own custom `{TestEngine}` by implementing the interfaces in the
@@ -45,7 +45,7 @@ annotation. For example, the `@Test` and `@TestFactory` annotations in JUnit Jup
4545meta-annotated with `@Testable`. Consult the Javadoc for `{Testable}` for further details.
4646
4747If your custom `TestEngine` needs to be configured, consider allowing users to supply
48- configuration via << running-tests-config-params, configuration parameters>> . Please note,
48+ configuration via xref: running-tests/configuration-parameters.adoc[ configuration parameters] . Please note,
4949however, that you are strongly encouraged to use a unique prefix for all configuration
5050parameters supported by your test engine. Doing so will ensure that there are no conflicts
5151between the names of your configuration parameters and those from other test engines. In
@@ -57,7 +57,7 @@ parameters. Furthermore, as with the warning above regarding the `junit-` prefix
5757configuration parameters.
5858
5959Although there is currently no official guide on how to implement a custom `TestEngine`,
60- you can consult the implementation of <<test-engines- junit>> or the implementation of
60+ you can consult the implementation of <<junit>> or the implementation of
6161third-party test engines listed in the
6262https://github.com/junit-team/junit-framework/wiki/Third-party-Extensions#junit-platform-test-engines[JUnit wiki].
6363You will also find various tutorials and blogs on the Internet that demonstrate how to
@@ -68,7 +68,7 @@ NOTE: `{HierarchicalTestEngine}` is a convenient abstract base implementation of
6868provide the logic for test discovery. It implements execution of `TestDescriptors` that
6969implement the `Node` interface, including support for parallel execution.
7070
71- [[test-engines- registration]]
71+ [[registration]]
7272== Registering a TestEngine
7373
7474`TestEngine` registration is supported via Java's `{ServiceLoader}` mechanism.
@@ -78,14 +78,14 @@ For example, the `junit-jupiter-engine` module registers its
7878`org.junit.platform.engine.TestEngine` within the `/META-INF/services` folder in the
7979`junit-jupiter-engine` JAR.
8080
81- [[test-engines- requirements]]
81+ [[requirements]]
8282== Requirements
8383
8484NOTE: The words "must", "must not", "required", "shall", "shall not", "should", "should
8585not", "recommended", "may", and "optional" in this section are to be interpreted as
8686described in https://www.ietf.org/rfc/rfc2119.txt[RFC 2119.]
8787
88- [[test-engines- requirements-mandatory]]
88+ [[requirements-mandatory]]
8989=== Mandatory requirements
9090
9191For interoperability with build tools and IDEs, `TestEngine` implementations must adhere
@@ -106,7 +106,7 @@ to the following requirements:
106106 after their children. If a node is reported as skipped, there _must not_ be any events
107107 reported for its descendants.
108108
109- [[test-engines- requirements-enhanced-compatibility]]
109+ [[requirements-enhanced-compatibility]]
110110=== Enhanced compatibility
111111
112112Adhering to the following requirements is optional but recommended for enhanced
@@ -119,20 +119,20 @@ compatibility with build tools and IDEs:
119119* When resolving `UniqueIdSelectors`, a `TestEngine` _should_ only return `TestDescriptor`
120120 instances with matching unique IDs including their ancestors but _may_ return additional
121121 siblings or other nodes that are required for the execution of the selected tests.
122- * `TestEngines` _should_ support << running-tests- tags, tagging>> tests and containers so
122+ * `TestEngines` _should_ support xref: running-tests/ tags.adoc[ tagging] tests and containers so
123123 that tag filters can be applied when discovering tests.
124- * [[test-engines- requirements-cancellation]] A `TestEngine` _should_ cancel its execution
124+ * [[requirements-cancellation]] A `TestEngine` _should_ cancel its execution
125125 when the `{CancellationToken}` it is passed as part of the `ExecutionRequest` indicates
126126 that cancellation has been requested. In this case, it _should_ report any remaining
127127 `TestDescriptors` as skipped but not report any events for their descendants. It _may_
128128 report already started `TestDescriptors` as aborted in case they have not been executed
129129 completely. If a `TestEngine` supports cancellation, it should clean up any resources
130130 that it has created just like if execution had finished regularly.
131131
132- [[test-engines- discovery-issues]]
132+ [[discovery-issues]]
133133== Reporting Discovery Issues
134134
135- Test engines should report << running-tests- discovery-issues, discovery issues>> if they
135+ Test engines should report xref: running-tests/ discovery-issues.adoc[ discovery issues] if they
136136encounter any problems or potential misconfigurations during test discovery. This is
137137especially important if the issue could lead to tests not being executed at all or only
138138partially.
@@ -143,7 +143,7 @@ In order to report a `{DiscoveryIssue}`, a test engine should call the
143143listener around, the `{DiscoveryIssueReporter}` interface should be used. It also provides
144144a way to create a `Condition` that reports a discovery issue if its check fails and may
145145be used as a `Predicate` or `Consumer`. Please refer to the implementations of the
146- <<test-engines- junit, test engines provided by JUnit>> for examples.
146+ <<junit, test engines provided by JUnit>> for examples.
147147
148- Moreover, <<testkit- engine-discovery, Engine Test Kit>> provides a way to write tests for
148+ Moreover, xref:advanced-topics/testkit.adoc# engine-discovery[ Engine Test Kit] provides a way to write tests for
149149reported discovery issues.
0 commit comments