Testcontainers – How to use them in your Spring Boot Integration Tests

Probably, the most annoying thing about integration tests is the need for testing infrastructure. If we want to test our Spring Data Repositories, we need a database. We could just use the H2 in-memory database provided by Spring Boot but the problem with this approach is, that H2 is probably not the database we use at runtime. This means, our integration tests don’t tell us if our code works as expected when it runs in the production environment. [Read More]