GH-876 - Mention test starter in testing reference documentation chapter.
This commit is contained in:
@@ -2,9 +2,20 @@
|
||||
= Integration Testing Application Modules
|
||||
|
||||
Spring Modulith allows to run integration tests bootstrapping individual application modules in isolation or combination with others.
|
||||
To achieve this, place JUnit test class in an application module package or any sub-package of that and annotate it with `@ApplicationModuleTest`:
|
||||
To achieve this, add the Spring Modulith test starter to your project like this
|
||||
|
||||
.A application module integration test class
|
||||
[source, xml]
|
||||
----
|
||||
<dependency>
|
||||
<groupId>org.springframework.modulith</groupId>
|
||||
<artifactId>spring-modulith-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
----
|
||||
|
||||
and place a JUnit test class in an application module package or any sub-package of that and annotate it with `@ApplicationModuleTest`:
|
||||
|
||||
.An application module integration test class
|
||||
[tabs]
|
||||
======
|
||||
Java::
|
||||
@@ -36,7 +47,7 @@ class OrderIntegrationTests {
|
||||
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.
|
||||
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:
|
||||
|
||||
.The log output of a application module integration test bootstrap
|
||||
.The log output of an application module integration test bootstrap
|
||||
[source, text, subs="macros"]
|
||||
----
|
||||
. ____ _ __ _ _
|
||||
|
||||
Reference in New Issue
Block a user