- •Re-run the failing test(s) multiple times (and/or with randomized order if supported).
- •Determine the flake type: time, concurrency, ordering, shared state, external dependency.
- •Stabilize by:
- •Removing shared mutable state
- •Using deterministic seeds/time control
- •Hermetic fixtures/test doubles
- •Reducing reliance on network/timeouts
- •Add a regression test or harness that reproduces the flake deterministically if possible.
- •Re-run the relevant suite and document the root cause + fix in the feature spec Debug log.
flaky-test-hunter
识别并稳定易出错的测试(种子、时间、隔离),同时不掩盖失败现象。
SKILL.md
--- frontmattername: flaky-test-hunter description: Identify and stabilize flaky tests (seeds, time, isolation) without hiding failures.