Integration tests are needed and simple
summary
Builds a carbon monoxide detector app and runs it inside a container with Testcontainers and Java, then proves three concrete requirements: start within four seconds, check every second, raise alarm above 400 ppm. Tests catch real bugs—wrong waiting strategy for container readiness, integer division and division-by-zero—fixes make the integration tests pass. Uses Testcontainers features (generic containers, waiting strategies, modules for DB/Kafka) and Testcontainers Cloud to run containers off-machine, showing integration tests that are simple, reproducible and give real deployment confidence.
AI-written summary · about
chapters (14)
- 0:00Introduction and setup
- 1:08About the speaker
- 3:41The gas detector analogy
- 8:22Why unit tests aren't enough
- 13:53Integration tests are needed
- 16:42Building the CO detector demo
- 21:18Testing with Testcontainers
- 23:06First test: startup time
- 30:40Fixing the waiting strategy
- 31:22Second test: checking particles
- 34:59Third test: raising alarm
- 43:39Testcontainers modules and features
- 46:31Testcontainers Cloud demo
- 47:34Feedback and closing
related talks
47mIntegration Tests: testcontainers to the Rescue
15mTestcontainers: Simplify Your Integration Tests and Development
51mTestContainers: Integration Testing Without the Hassle
24mIntegration Testing Made Easy: Leveraging Testcontainers and
26mRemoving Complexity from Integration Tests Using Testcontainers
30mIntegration tests & testContainers
43mRemoving complexity from integration tests using Testcontainers!
48mContainers for Real Integration Tests
