'2019/03/31'에 해당되는 글 1건

  1. 2019.03.31 spring boot 2의 test 종류

 

spring boot 2 책을 보면 WebMvcTest DataJpaTest, JsonTest, RestClientTest  등을 설명하는데..

 

이것만 있는 것이 아니다. 

 

여러 개가 더 있다.

 

https://docs.spring.io/spring-boot/docs/current/reference/html/test-auto-configuration.html

 

Appendix D. Test auto-configuration annotations

Appendix D. Test auto-configuration annotations The following table lists the various @…Test annotations that can be used to test slices of your application and the auto-configuration that they import by default: Test sliceImported auto-configuration@DataJ

docs.spring.io

 

@DataJdbcTest

@DataLdapTest

@DataMongoTest

@DataNeo4jTest

@WebFluxTest

@DataRedisTest

@JdbcTest

@JooqTest 등을 포함한다.

 

 

자세한 내용은 다음을 확인한다. 

 

https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-testing.html

 

46. Testing

A Spring Boot application is a Spring ApplicationContext, so nothing very special has to be done to test it beyond what you would normally do with a vanilla Spring context. By default, @SpringBootTest will not start a server. You can use the webEnvironment

docs.spring.io

 

Posted by '김용환'
,