How to reuse Testcontainers between multiple SpringBootTests?
You can’t use the JUnit Jupiter annotation @Container if you want to have reusable containers. This annotation ensures to stop the container after each test. What you need is the singleton container approach, and use e.g. @BeforeAll to start your containers. Even though you then have .start() in multiple tests, Testcontainers won’t start a new … Read more