Skip to content

Commit 29cd1cc

Browse files
dreis2211wilkinsona
authored andcommitted
Document that test slices should not be combined
See gh-15310
1 parent b094e28 commit 29cd1cc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6837,6 +6837,10 @@ restricted set of auto-configuration classes. If you need to exclude one of them
68376837
most `@...Test` annotations provide an `excludeAutoConfiguration` attribute.
68386838
Alternatively, you can use `@ImportAutoConfiguration#exclude`.
68396839

6840+
NOTE: Including multiple "`slices`" via the several `@...Test` annotations in one test is
6841+
not supported. If you need multiple "`slices`", pick one of the `@...Test` annotations
6842+
and include the `@AutoConfigure...` annotations of the other "`slices`" by hand.
6843+
68406844
TIP: It is also possible to use the `@AutoConfigure...` annotations with the standard
68416845
`@SpringBootTest` annotation. You can use this combination if you are not interested in
68426846
"`slicing`" your application but you want some of the auto-configured test beans.

0 commit comments

Comments
 (0)