Removing complexity from integration tests using Testcontainers!
summary
Claim: Testcontainers replaces brittle mocks by launching real throwaway services for integration tests, demonstrated with a Spring Boot “ratings” microservice that uses PostgreSQL 14, Kafka container and Redis generic container, all started in parallel with randomized ports. Code shows H2 failing on Postgres-specific SQL, adding testcontainers-postgresql fixes it, tests run and pass, containers auto-clean. Also shows static containers to reuse across tests and testcontainers.cloud to run Docker-less CI.
AI-written summary · about
chapters (4)
related talks
43mRemoving complexity from integration tests using Testcontainers!
26mRemoving Complexity from Integration Tests Using Testcontainers
26mSimplify Your Dev Life with Testcontainers
59mIntegration and end-to-end testing with TestContainers and JUnit 5
48mTestcontainers and Spring Boot from integration tests to local development!
50mMastering Integration Tests with Testcontainers.
32mMock my infrastructure! Using Testcontainers for better integration tests.
53mTestcontainers: a year-in-review
