Using Docker & Compose to Simplify Integration Testing
summary
Claims that containerizing tests and dependencies makes integration testing reproducible and fast and demonstrates it end to end: builds a Node/Mocha test image, runs Mongo with an Mongo init script to seed data, builds a pubsub emulator image, adds a small wait executable to gate tests until services are ready, composes them with docker-compose, maps test-results.xml via a volume, uses exit-code-from and JUnit reporting, and runs the whole flow in Azure DevOps — tests run and pass locally and in CI.
AI-written summary · about
chapters (11)
- 0:00Introduction to Docker
- 1:50Integration testing basics
- 3:13Running tests in containers
- 6:01Why use containers?
- 7:45Containerizing MongoDB
- 10:35Using init scripts
- 13:35Setting up PubSub
- 16:16Docker Compose integration
- 21:07Running the full test suite
- 25:10Automated build pipelines
- 28:23Conclusion
related talks
27mIntegration testing for Microservices with Docker and TestContainers
42mUse Docker to test microservices
51mTestContainers: Integration Testing Without the Hassle
34mTest Environments Management with
32mUsing Docker in test automation
28mContinuous Integration Testing: Fully Test your Microservices Application, Early and Often
30mTest as You Run - Production-like Integration Tests with Docker
24mIntegration Testing Made Easy: Leveraging Testcontainers and
