Skip to content

Commit 325eb24

Browse files
committed
GH-875 - Mention test starter in testing reference documentation chapter.
1 parent 439f134 commit 325eb24

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

src/docs/antora/modules/ROOT/pages/testing.adoc

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,20 @@
22
= Integration Testing Application Modules
33

44
Spring Modulith allows to run integration tests bootstrapping individual application modules in isolation or combination with others.
5-
To achieve this, place JUnit test class in an application module package or any sub-package of that and annotate it with `@ApplicationModuleTest`:
5+
To achieve this, add the Spring Modulith test starter to your project like this
66

7-
.A application module integration test class
7+
[source, xml]
8+
----
9+
<dependency>
10+
<groupId>org.springframework.modulith</groupId>
11+
<artifactId>spring-modulith-starter-test</artifactId>
12+
<scope>test</scope>
13+
</dependency>
14+
----
15+
16+
and place a JUnit test class in an application module package or any sub-package of that and annotate it with `@ApplicationModuleTest`:
17+
18+
.An application module integration test class
819
[tabs]
920
======
1021
Java::
@@ -36,7 +47,7 @@ class OrderIntegrationTests {
3647
This will run your integration test similar to what `@SpringBootTest` would have achieved but with the bootstrap actually limited to the application module the test resides in.
3748
If you configure the log level for `org.springframework.modulith` to `DEBUG`, you will see detailed information about how the test execution customizes the Spring Boot bootstrap:
3849

39-
.The log output of a application module integration test bootstrap
50+
.The log output of an application module integration test bootstrap
4051
[source, text, subs="macros"]
4152
----
4253
. ____ _ __ _ _

0 commit comments

Comments
 (0)