Playwright Email Tests Need a Timing Probe
Описание и применение
Тайминг‑проба в Playwright позволяет разделить задержки на четыре границы, выявляя источник проблемы в приложении, очереди, почтовом сервисе или браузере.
Задача
Email tests often fail with a generic timeout, hiding four distinct delays and making failures appear random.
Результат
The probe provides clear boundaries for each delay, turning random timeouts into actionable diagnostics and reducing unnecessary retries.
Рабочий процесс
- 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
Доказательства
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.
- Дата записи: 2026-10-27T21:11:13.547Z