Flaky Test Eliminator

作者:promptpacks发布日期:2026-09-21观看:26

Diagnoses flaky tests by category (async timing, order dependence, shared state, date/randomness) and gives deterministic fixes.

01/ 01

This test is flaky (fails ~{{X}}% in CI, passes locally): {{TEST + relevant production code}} CI environment: {{runtime, parallelism, os}} Classify the flake against this checklist and find the likely cause: - Timing: fixed sleeps vs actual readiness; no timeout or unbounded wait. - Order dependence: shared DB/files/caches/env vars, polluted singletons. - Non-determinism: Date.now/random/UUID ordering, timezone/locale, float/string formatting, map iteration order. - Concurrency: unjoined tasks, race on promises, background jobs outliving test. - Network: real external calls, DNS, port conflicts, retries crossing assertions. - Resource: ports, tmp file collisions, disk/CI load, missing cleanup. Then provide: (1) root-cause evidence to collect (run with --repeat/--seed, single-thread vs parallel), (2) the deterministic fix (fake clock, injected IDs, isolated schema, await readiness signals, contract mocks), (3) a regression strategy (stress loop in CI temporarily, quarantine rules), and (4) guidance on when a test should be deleted vs fixed. ================================================================================

自动翻译

自动翻译中…

🔥热搜词

评论0

登录后参与评论

还没有评论,来抢沙发吧