flaky-test-management
Installation
SKILL.md
Flaky Test Management
A flaky test is a test with different outcomes on the same code. It destroys trust: teams learn to ignore red builds. Treat flakes as bugs with an owner and SLA.
1. Detect & measure
- Re-run failed tests N× on the same commit (
pytest --reruns 3 --only-rerun ...,jest --retryTimes, Playwrightretries), and record every retry-pass as a flake signal — don't just hide it. - Nightly: run whole suite 10–50× (
pytest -p no:randomly --count=20,repeat-eachin Playwright:npx playwright test --repeat-each=20). - Metric: flake rate = flaky runs / total runs per test; alert > 1%. Suite health = % builds red for non-code reasons.