사용자 도구

사이트 도구


springframework:springboot:test

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
다음 판 양쪽 다음 판
springframework:springboot:test [2018/06/21 16:52]
kwon37xi
springframework:springboot:test [2018/11/26 16:28]
kwon37xi
줄 3: 줄 3:
   * [[https://github.com/spring-projects/spring-boot/tree/master/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure|Spring Boot Test Autoconfigure]] 여기에서 각종 test 자동화 Annotation을 확인할 수 있다.   * [[https://github.com/spring-projects/spring-boot/tree/master/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure|Spring Boot Test Autoconfigure]] 여기에서 각종 test 자동화 Annotation을 확인할 수 있다.
  
-===== ''@TestProperties'' =====+===== @SpringBootTest ===== 
 +==== 테스트용 프라퍼티 지정 ==== 
 +<code java> 
 +@SpringBootTest(properties = {"some.username=user", "some.password=pwd"}, 
 +                webEnvironment = SpringBootTest.WebEnvironment.NONE) 
 +</code> 
 + 
 + 
 +===== @TestProperties ===== 
 +  * [[https://www.baeldung.com/spring-test-property-source|A Quick Guide to @TestPropertySource | Baeldung]]
   * 테스트용 프라퍼티 오버라이드   * 테스트용 프라퍼티 오버라이드
 <code java> <code java>
줄 10: 줄 19:
  
 } }
 +
 +
 +You can use @TestPropertySource
 +
 +@TestPropertySource(
 +    properties = {
 +        "some.username=validate",
 +        "some.password=false"
 +    }
 +)
 </code> </code>
  
줄 17: 줄 36:
   * [[http://hyper-cube.io/2017/08/06/spring-boot-test-1/|Spring Boot에서 테스트를 - 1]]   * [[http://hyper-cube.io/2017/08/06/spring-boot-test-1/|Spring Boot에서 테스트를 - 1]]
   * [[http://hyper-cube.io/2017/08/10/spring-boot-test-2/|Spring Boot에서 테스트를 - 2]]   * [[http://hyper-cube.io/2017/08/10/spring-boot-test-2/|Spring Boot에서 테스트를 - 2]]
- +  * [[https://allegro.tech/2018/04/Spring-WebMvcTest-with-Spock.html|Spring @WebMvcTest with Spock Framework · allegro.tech]] 
- +  * [[https://objectpartners.com/2018/06/14/spock-1-2-annotations-for-spring-integration-testing/|Spock 1.2 and Spring Integration Testing | Object Partners]] 
 +  * [[https://solidsoft.wordpress.com/2018/09/03/spock-1-2-hassle-free-spring-beans-mocking-in-integration-tests/|Spock 1.2 – hassle-free Spring beans mocking in integration tests | Solid Soft]]
springframework/springboot/test.txt · 마지막으로 수정됨: 2022/08/31 16:02 저자 kwon37xi