Spring test 5

[Spring Test] JUnit 5 Conditional Test Execution with Annotations

https://www.baeldung.com/junit-5-conditional-test-execution 조건부 테스트 적용 방법 Operating System Conditions 경우에 따라 OS(운영체제)에 따른 테스트 시나리오를 변경해야할 경우가 있다 @EnabledOnOs 애노테이션을 붙이고 값을 제공하면 된다. 배열 인수도 가능하다. @Test @EnabledOnOs({OS.WINDOWS, OS.MAC}) public void shouldRunBothWindowsAndMac() { //... } @DisabledOnOs는 이름에서 알 수 있듯이 OS 유형 인수에 따라 테스트를 비활성화한다. @Test @DisabledOnOs(OS.LINUX) public void shouldNotRunAtLi..

Web/spring 2023.04.03

[Spring Test] Guide to JUnit 5 Parameterized Tests

https://www.baeldung.com/parameterized-tests-junit-5 Guide to JUnit 5 Parameterized Tests | Baeldung Learn how to simplify test coverage in JUnit 5 with parameterized tests www.baeldung.com JUnit5 는 여러 유용한 기능으로 테스트를 쉽게 할 수 있게 한다 특히 Parameterized 된 테스트를 이용하면, 다른 매개변수를 사용하여 단일 테스트를 여러번 실행할 수 있어 유용하다 https://junit.org/junit5/docs/current/user-guide/#running-tests-ide-eclipse JUnit 5 User Guide Alth..

Web/spring 2023.04.03

[Spring framework testing] 5. Spring TestContext Framework (1)

https://docs.spring.io/spring-framework/docs/current/reference/html/testing.html#testcontext-framework Testing The classes in this example show the use of named hierarchy levels in order to merge the configuration for specific levels in a context hierarchy. BaseTests defines two levels in the hierarchy, parent and child. ExtendedTests extends BaseTests and instruct docs.spring.io 틀린 부분이 있으면 알려주세..

Web/spring 2023.02.09

[Spring framework Testing] 2. Unit Testing

틀린 해석이 있다면 알려주세요 https://docs.spring.io/spring-framework/docs/current/reference/html/testing.html#testing-introduction 주말이니까ㅎㅎㅎ 간단하게 스프링 테스트에 대한 공식 문서를 읽어보기로 했다. 스프링 공식문서에도 서술하고 있듯이 개발자에게 테스트는 굉장히 중요하고 스프링은 단위테스트를 위한 방법을 잘 설명해주고 있다 오늘은 Unit Test 를 맛보기로 살펴보는 걸로!! 2. Unit Testing Dependency injection DI 는 기존 EE 개발에서보다 컨테인에 대한 코드 종속성을 줄여야한다. 애플리케이션을 구성하는 POJO는 JUnit 또는 TestNG테스트가 가능해야하며 new 를 사용하거나..

Web/spring 2023.02.04
728x90