Spring/Test
-
spring boot 3.1 - testcontainers 2 - container lifecycleSpring/Test 2023. 12. 28. 14:30
Junit & test container lifecycle 아래의 절차대로 실행됩니다 BeforeEach, Test1 1. Connect to docker 2. Ryuk started 3. Checking the system 4. Start Container 5. Excute BeforeEach method @BeforeEach 에서 getContainer##() 메소드를 호출하여 사용할 수 있습니다. 6. test1() method 실행 반대로 @AfterEach 이후에 Ryuk 이 container 를 cleans up 시킵니다. BeforeEach, test2() test1() 메소드 종료후 container 도 이미 clean up 하였으므로, @BeforeEach 에서 containerId 를 ..
-
spring boot 3.1 - testcontainersSpring/Test 2023. 12. 3. 16:22
blog : https://spring.io/blog/2023/06/23/improved-testcontainers-support-in-spring-boot-3-1 Improved Testcontainers Support in Spring Boot 3.1 There's been support for Testcontainers in Spring Boot for some time now, and Spring Boot 3.1 improves it further. But first, let's take a look at what Testcontainers is and how it's usually used. Testcontainers is an open source framework for providing t..