Automating resilience testing with Docker and Property Based testing
summary
Uses Docker Compose to spin isolated test environments, an IG open source tool IG havoc to inject network, process and HTTP faults, and property based testing to generate random fault sequences and assert properties like at-least-once delivery, bounded duplicates (~10% tolerance) and ordering. The test harness reproduces four real outages (and found one reproducible only after changing the test pattern), uncovers specific bugs (401 responses causing message loss, huge responses crashing the service, startup and Kafka setup dependencies), and runs for hours or days with a full “burn to ground” rollback.
AI-written summary · about
chapters (21)
- 0:00Introduction and background
- 4:44Defining resilience testing
- 6:51Current resilience testing challenges
- 8:37Desired resilience testing setup
- 9:20Introducing Docker Compose
- 10:23Introducing IG Havoc library
- 11:25Example system architecture
- 12:31Docker Compose file walkthrough
- 14:18Writing first resilience test
- 15:22Test code explanation
- 17:53Why property based testing
- 19:16Property based testing explained
- 22:54Resilience testing properties
- 23:57Generating random test plans
- 26:25Implementing property based test
- 28:09Reproducing outages with tests
- 31:45Testing healthy states
- 32:48Drawbacks of the approach
- 34:11Research on system failures
- 34:54Key takeaways
- 35:37Q&A session
