Skip to content

Commit 48c344e

Browse files
committed
Fix links
1 parent 7cf117c commit 48c344e

File tree

62 files changed

+567
-576
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+567
-576
lines changed

documentation/modules/ROOT/pages/advanced-topics/engines.adoc

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ A `TestEngine` facilitates _discovery_ and _execution_ of tests for a particular
44
programming model.
55

66
For 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

1212
JUnit 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

2323
You 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
4545
meta-annotated with `@Testable`. Consult the Javadoc for `{Testable}` for further details.
4646

4747
If 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,
4949
however, that you are strongly encouraged to use a unique prefix for all configuration
5050
parameters supported by your test engine. Doing so will ensure that there are no conflicts
5151
between 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
5757
configuration parameters.
5858

5959
Although 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
6161
third-party test engines listed in the
6262
https://github.com/junit-team/junit-framework/wiki/Third-party-Extensions#junit-platform-test-engines[JUnit wiki].
6363
You 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
6868
provide the logic for test discovery. It implements execution of `TestDescriptors` that
6969
implement 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

8484
NOTE: The words "must", "must not", "required", "shall", "shall not", "should", "should
8585
not", "recommended", "may", and "optional" in this section are to be interpreted as
8686
described in https://www.ietf.org/rfc/rfc2119.txt[RFC 2119.]
8787

88-
[[test-engines-requirements-mandatory]]
88+
[[requirements-mandatory]]
8989
=== Mandatory requirements
9090

9191
For 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

112112
Adhering 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
136136
encounter any problems or potential misconfigurations during test discovery. This is
137137
especially important if the issue could lead to tests not being executed at all or only
138138
partially.
@@ -143,7 +143,7 @@ In order to report a `{DiscoveryIssue}`, a test engine should call the
143143
listener around, the `{DiscoveryIssueReporter}` interface should be used. It also provides
144144
a way to create a `Condition` that reports a discovery issue if its check fails and may
145145
be 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
149149
reported discovery issues.

documentation/modules/ROOT/pages/advanced-topics/junit-platform-reporting.adoc

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22

33
The `junit-platform-reporting` artifact contains `{TestExecutionListener}` implementations
44
that generate XML test reports in two flavors:
5-
<<junit-platform-reporting-open-test-reporting, Open Test Reporting>> and
6-
<<junit-platform-reporting-legacy-xml, legacy>>.
5+
<<open-test-reporting, Open Test Reporting>> and
6+
<<legacy-xml, legacy>>.
77

88
NOTE: The module also contains other `TestExecutionListener` implementations that can be
9-
used to build custom reporting. See <<running-tests-listeners>> for details.
9+
used to build custom reporting. See xref:running-tests/using-listeners-and-interceptors.adoc[] for details.
1010

11-
[[junit-platform-reporting-output-directory]]
11+
[[output-directory]]
1212
== Output Directory
1313

1414
The JUnit Platform provides an `{OutputDirectoryCreator}` via `{EngineDiscoveryRequest}`
15-
and `{TestPlan}` to registered <<test-engines, test engines>> and
16-
<<running-tests-listeners, listeners>>, respectively. Its root directory can be configured
17-
via the following <<running-tests-config-params, configuration parameter>>:
15+
and `{TestPlan}` to registered xref:advanced-topics/engines.adoc[test engines] and
16+
xref:running-tests/using-listeners-and-interceptors.adoc[listeners], respectively. Its root directory can be configured
17+
via the following xref:running-tests/configuration-parameters.adoc[configuration parameter]:
1818

1919
`junit.platform.reporting.output.dir=<path>`::
2020
Configure the output directory for reporting. By default, `build` is used if a Gradle
@@ -27,15 +27,15 @@ directories like `reports/junit-8803697269315188212`. This can be useful when us
2727
Gradle's or Maven's parallel execution capabilities which create multiple JVM forks
2828
that run concurrently.
2929

30-
[[junit-platform-reporting-open-test-reporting]]
30+
[[open-test-reporting]]
3131
== Open Test Reporting
3232

3333
`{OpenTestReportGeneratingListener}` writes an XML report for the entire execution in the
3434
event-based format specified by {OpenTestReporting} which supports all features of the
3535
JUnit Platform such as hierarchical test structures, display names, tags, etc.
3636

3737
The listener is auto-registered and can be configured via the following
38-
<<running-tests-config-params, configuration parameters>>:
38+
xref:running-tests/configuration-parameters.adoc[configuration parameters]:
3939

4040
`junit.platform.reporting.open.xml.enabled=true|false`::
4141
Enable/disable writing the report; defaults to `false`.
@@ -47,11 +47,11 @@ The listener is auto-registered and can be configured via the following
4747
connection is automatically closed when the test execution completes.
4848

4949
If enabled, the listener creates an XML report file named `open-test-report.xml` in the
50-
configured <<junit-platform-reporting-output-directory, output directory>>, unless the
50+
configured <<output-directory, output directory>>, unless the
5151
`junit.platform.reporting.open.xml.socket` configuration parameter is set, in which case the
5252
events are sent to the specified socket instead.
5353

54-
If <<running-tests-capturing-output, output capturing>> is enabled, the captured output
54+
If xref:running-tests/capturing-standard-output-error.adoc[output capturing] is enabled, the captured output
5555
written to `System.out` and `System.err` will be included in the report as well.
5656

5757
TIP: The {OpenTestReportingCliTool} can be used to convert from the event-based format to
@@ -142,7 +142,7 @@ XML reports as follows:
142142

143143
=== Console Launcher
144144

145-
When using the <<running-tests-console-launcher>>, you can enable Open Test Reporting
145+
When using the xref:running-tests/console-launcher.adoc[], you can enable Open Test Reporting
146146
output by setting the configuration parameters via `--config`:
147147

148148
[source,console,subs=attributes+]
@@ -161,12 +161,12 @@ $ java -jar junit-platform-console-standalone-{version}.jar <OPTIONS> \
161161
--config-resource=configuration.properties
162162
----
163163

164-
[[junit-platform-reporting-legacy-xml]]
164+
[[legacy-xml]]
165165
== Legacy XML format
166166

167167
`{LegacyXmlReportGeneratingListener}` generates a separate XML report for each root in the
168168
`{TestPlan}`. Note that the generated XML format is compatible with the de facto standard
169169
for JUnit 4 based test reports that was made popular by the Ant build system.
170170

171-
The `LegacyXmlReportGeneratingListener` is used by the <<running-tests-console-launcher>>
171+
The `LegacyXmlReportGeneratingListener` is used by the xref:running-tests/console-launcher.adoc[]
172172
as well.

documentation/modules/ROOT/pages/advanced-topics/junit-platform-suite-engine.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
= JUnit Platform Suite Engine
22

33
The Suite Engine supports the declarative selection and execution of tests from _any_ test
4-
engine on the JUnit Platform using the <<launcher-api>>.
4+
engine on the JUnit Platform using the xref:advanced-topics/launcher-api.adoc[].
55

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

8-
[[junit-platform-suite-engine-setup]]
8+
[[setup]]
99
== Setup
1010

1111
In addition to the `junit-platform-suite-api` and `junit-platform-suite-engine` artifacts,
1212
you need _at least one_ other test engine and its dependencies on the classpath. See
13-
<<dependency-metadata>> for details regarding group IDs, artifact IDs, and versions.
13+
xref:appendix.adoc#dependency-metadata[Dependency Metadata] for details regarding group IDs, artifact IDs, and versions.
1414

15-
[[junit-platform-suite-engine-setup-required-dependencies]]
15+
[[setup-required-dependencies]]
1616
=== Required Dependencies
1717

1818
* `junit-platform-suite-api` in _test_ scope: artifact containing annotations needed to
@@ -24,15 +24,15 @@ NOTE: Both of the required dependencies are aggregated in the `junit-platform-su
2424
artifact which can be declared in _test_ scope instead of declaring explicit dependencies
2525
on `junit-platform-suite-api` and `junit-platform-suite-engine`.
2626

27-
[[junit-platform-suite-engine-setup-transitive-dependencies]]
27+
[[setup-transitive-dependencies]]
2828
=== Transitive Dependencies
2929

3030
* `junit-platform-launcher` in _test_ scope
3131
* `junit-platform-engine` in _test_ scope
3232
* `junit-platform-commons` in _test_ scope
3333
* `opentest4j` in _test_ scope
3434

35-
[[junit-platform-suite-engine-example]]
35+
[[example]]
3636
== @Suite Example
3737

3838
Annotate a class with `@Suite` to have it marked as a test suite on the JUnit Platform. As
@@ -60,7 +60,7 @@ suite, respectively.
6060
include::example$java/example/BeforeAndAfterSuiteDemo.java[tags=user_guide]
6161
----
6262

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

6666
Depending on the declared selectors, different suites may contain the same tests,
@@ -75,5 +75,5 @@ include only the `junit-platform-suite` engine, or use a custom naming pattern.
7575
example, name all suites `*Suite` and all tests `*Test`, and configure your build tool to
7676
include only the former.
7777

78-
Alternatively, consider <<running-tests-tags, using tags>> to select specific groups of
78+
Alternatively, consider xref:running-tests/tags.adoc[using tags] to select specific groups of
7979
tests.

0 commit comments

Comments
 (0)