SpringBoot @IntegrationTest annotation for testing

I am very new to SpringBoot. I need to understand how to write an integration test using SpringBoot. I saw several examples on the Internet that use the @IntegrationTest annotation, and some other examples that use the @SpringBootTest annotation.

I'm just wondering what is the difference between the two?

What is the best way to write integration test in spring boot?

+7
spring boot
source share
1 answer

IntegrationTest was an obsolete sine spring boot 1.4, so the sentence uses SpringBootTest after 1.4

Deprecated since 1.4 in favor of org.springframework.boot.test.context.SpringBootTest with webEnvironment = RANDOM_PORT or webEnvironment = DEFINED_PORT.

+16
source share

All Articles