Playwright Email Tests Need a Timing Probe
Description and use
A timing probe in Playwright splits delays into four boundaries, revealing whether the issue lies in the app, queue, inbox, or browser.
Problem
Email tests often fail with a generic timeout, hiding four distinct delays and making failures appear random.
Outcome
The probe provides clear boundaries for each delay, turning random timeouts into actionable diagnostics and reducing unnecessary retries.
Workflow
- Record submittedAt when registration request completes
- Poll inbox for message with correlation token, record acceptedAt on first poll
- When message found, record foundAt
- Navigate to verification link and assert success, record verifiedAt
- Attach timing artifact to test report
Evidence
When all of those delays are hidden behind one timeout, a test failure look random.
The probe does not need a large observability platform. Start with a run ID and four timestamps:
Use a bounded poll with a clear interval, and capture the timing artifact whether the test passes or fails.
- Record date: 2026-10-27T21:11:13.547Z