Can Spring Boot test classes reuse application context for faster test run?

vicusbass picture vicusbass · May 25, 2017 · Viewed 18k times · Source

@ContextConfiguration location attribute does not make sense for Spring Boot integration testing. Is there any other way for reusing application context across multiple test classes annotated with @SpringBootTest ?

Answer

luboskrnac picture luboskrnac · May 25, 2017

Yes. Actually it is default behavior. The link point to Spring Framework docs, which is used by Spring Boot under the hood.

BTW, context is reused by default also when @ContextConfiguration is used as well.