47 / 75 · 08 Infrastructure as Code Testing · Event-Driven System Testing← prev⊞ allnext →☰ Read as one page
9.1The Fundamental Challenge
Event-driven architectures (SQS, EventBridge, Kafka, SNS) are notoriously difficult to test because there is no synchronous request-response cycle to assert against. When you publish an event, you cannot immediately check the result. The consumer might process it in milliseconds, seconds, or minutes. It might fail silently. It might process it twice.
This asynchronous nature requires a fundamentally different testing approach: instead of "call and assert," you adopt "publish, wait, and verify state."