Loading...
Loading...
Compare original and translation side by side
$ARGUMENTSe2e/login.spec.ts"should redirect after login""the checkout test fails in CI but passes locally"$ARGUMENTSe2e/login.spec.ts"should redirect after login""该结账测试在CI中失败,但本地运行通过"npx playwright test <file> --reporter=listnpx playwright test <file> --repeat-each=10 --reporter=listnpx playwright test --fully-parallel --workers=4 --repeat-each=5npx playwright test <file> --reporter=listnpx playwright test <file> --repeat-each=10 --reporter=listnpx playwright test --fully-parallel --workers=4 --repeat-each=5npx playwright test <file> --trace=on --retries=0/debugnpx playwright test <file> --trace=on --retries=0/debugflaky-taxonomy.md| Category | Symptom | Diagnosis |
|---|---|---|
| Timing/Async | Fails intermittently everywhere | |
| Test Isolation | Fails in suite, passes alone | |
| Environment | Fails in CI, passes locally | Compare CI vs local screenshots/traces |
| Infrastructure | Random, no pattern | Error references browser internals |
flaky-taxonomy.md| 类别 | 症状 | 诊断方式 |
|---|---|---|
| 时序/异步问题 | 在所有环境中间歇性失败 | 本地执行 |
| 测试隔离问题 | 在测试套件中失败,单独运行通过 | 执行 |
| 环境差异问题 | 在CI中失败,本地运行通过 | 对比CI与本地的截图/追踪信息 |
| 基础设施问题 | 随机出现,无固定规律 | 错误信息涉及浏览器内部机制 |
waitForTimeout()awaittoBeVisible()dockerretries: 2waitForTimeout()awaittoBeVisible()dockerretries: 2npx playwright test <file> --repeat-each=10 --reporter=listnpx playwright test <file> --repeat-each=10 --reporter=listretries: 2trace: 'on-first-retry'retries: 2trace: 'on-first-retry'