Document that test slices should not be combined

See gh-15310
This commit is contained in:
dreis2211 2018-11-27 16:35:02 +01:00 committed by Andy Wilkinson
parent b094e28081
commit 29cd1cc762
1 changed files with 4 additions and 0 deletions

View File

@ -6837,6 +6837,10 @@ restricted set of auto-configuration classes. If you need to exclude one of them
most `@...Test` annotations provide an `excludeAutoConfiguration` attribute.
Alternatively, you can use `@ImportAutoConfiguration#exclude`.
NOTE: Including multiple "`slices`" via the several `@...Test` annotations in one test is
not supported. If you need multiple "`slices`", pick one of the `@...Test` annotations
and include the `@AutoConfigure...` annotations of the other "`slices`" by hand.
TIP: It is also possible to use the `@AutoConfigure...` annotations with the standard
`@SpringBootTest` annotation. You can use this combination if you are not interested in
"`slicing`" your application but you want some of the auto-configured test beans.