Event Driven Architecture: Love Triangle in Integration Testing
summary
Shows a concrete test setup that spins Docker containers with MongoDB and LocalStack + SQS, runs the Java service, publishes a payment event, and verifies DB changes via a REST wrapper (Red Hat/REST image). Uses Testcontainers and Karate for BDD-style scripts, external JSON fixtures, and a retry 10 times @ 3s polling strategy to wait for asynchronous processing. Demo runs four integration scenarios in ~21s, and tests explicitly remove produced events to avoid cross-test flakiness.
AI-written summary · about
chapters (17)
- 0:00Welcome
- 2:00Host overview
- 3:40Speaker context
- 5:26Event-driven testing problems
- 11:55Testing tools and libraries
- 14:52Karate basics
- 19:20Four-step event testing
- 21:44Demo setup
- 27:46Reservation test scenario
- 30:54Event simulation and DB checks
- 34:28Event production and cleanup
- 36:12Running tests with Testcontainers
- 38:47Test results demo
- 40:03Best practices
- 42:29Resources and books
- 42:52Q&A
- 47:22Closing
related talks
24mIntegration Testing Made Easy: Leveraging Testcontainers and
27mIntegration testing for Microservices with Docker and TestContainers
47mIntegration Tests: testcontainers to the Rescue
48mContainers for Real Integration Tests
49mThey say testing triangle but you are doing microservices. Now what?
26mRemoving Complexity from Integration Tests Using Testcontainers
59mIntegration and end-to-end testing with TestContainers and JUnit 5
30mUsing Docker & Compose to Simplify Integration Testing
