A Failure Budget for Disposable Email Automation
A Failure Budget for Disposable Email Automation Email verification tests often look binary: the message arrived or it did not. In a real CI pipeline, that model is too small. A temporary inbox can be slow, a provider can return a transient error, or a worker can poll at the wrong moment. If every timeout becomes a red build, the test suite starts reporting infrastructure noise instead of product…
The report discusses the concept of a "Failure Budget" for disposable email automation in CI pipelines. Traditional email tests often have binary outcomes, but this approach can lead to infrastructure noise instead of product defects. The author proposes a better mental model, where each email check is given a small failure budget.
This allows the test to distinguish between a missing message and a short-lived delivery problem. The report outlines three outcomes for email checks: product failure, fixture failure, and timing failure, each with distinct responses. It also emphasizes the importance of naming the error where it is observed and passing that name into the test report.
The report suggests defining an emailPolicy object to keep the policy in one place, with parameters for firstWaitMs, pollEveryMs, maxWaitMs, and maxProviderRetries. Each limit should have a reason and be visible in the report. The report also recommends creating a unique address or inbox key per run to avoid late messages from older jobs satisfying newer assertions.
Brief written by urgent.news; may contain errors — check the original.
Source: dev.to