Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

A Playwright Inbox Probe for Slow Email Tests

说明与用途

Playwright inbox 探针可靠检测验证邮件,消除随机失败,并捕获详细的调试证据。

问题

Email-driven browser tests often fail because the verification email is not found, leading to random failures due to clock drift between the application, worker, and mailbox API.

结果

The probe reliably detects the verification email, reduces flaky failures, and records actionable evidence (run ID, mailbox, poll count, timestamps, inbox status, browser trace).

工作流

  • Create a unique test mailbox address
  • Submit the sign‑up form
  • Poll the mailbox for a message addressed to the test address and containing a unique run ID
  • Return the message and polling metrics or throw an error if the deadline is exceeded

证据

Email-driven browser tests often fail in the least helpful way: the registration form passes, but the test cannot find the verification message.

来源

A reliable test needs more than a long timeout. It needs an inbox probe: a small, bounded workflow that proves which mailbox belongs to the test, polls for the expected message, and records enough evidence to explain a miss.

来源

The sample keeps the deadline separate from the polling interval. That makes the behavior visible in code and easy to tune.

来源

  • 记录日期: 2026-10-27T06:11:19.543Z