TestContainers — integration testing with Docker
summary
Introduces TestContainers, a Java library for integration testing that uses Docker to run real service dependencies (databases, message brokers, etc.) in containers during tests. Explains how to configure and use TestContainers with JUnit to create reproducible, isolated integration tests and demonstrates practical examples of starting containers, managing lifecycles, and integrating them into CI pipelines.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 1:13Integration testing matters
- 8:13Docker as testing solution
- 12:29What are TestContainers
- 14:59Microservices testing with TestContainers
- 23:50Optimizing TestContainers performance
- 28:28Parallel test execution benefits
- 30:53Selenium in Docker
- 33:09TestContainers without frameworks
- 37:11Key takeaways
- 39:23Q&A
- 43:35Integration testing depth
- 46:41Ignoring tests and Docker checks
- 48:57Missing Docker environments
- 50:14Docker Compose integration
- 53:30Private registry auth
- 55:17Final Q&A
