Flaky tests · senior
Retries, quarantine and a suite that went red
Retries hide problems and quarantine needs an owner and a date. After a big UI change, group the failures before you fix any.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- Retries hide intermittent real bugs (races, timeouts users also hit) and slow the pipeline. "Later" rarely comes.
- A reasonable use: one retry, reported as flaky and not as passed, to collect data while fixes are in progress. Playwright marks such tests flaky.
- Quarantine: move flaky tests out of the blocking set into a separate job that still runs. Each gets a ticket, an owner and a deadline, or it is deleted and its risk covered another way.
- Measure flaky rate per test from CI history (passed on retry, or failed and then passed on the same commit). Rerun suspects 50 to 100 times.
- Order the fixes by value and by shared cause.
- When 340 tests turn red after a redesign: group failures by error type and by the failing step or locator. Most share a few causes.
- Check the main journeys by hand and through API tests first, so the release decision does not wait for the UI suite.
- Send a clear message: what failed and why, what you checked, what is fixed, and when the suite will be back. One change broke many tests because locators were copied into tests instead of living in one page object.
The red pen
Common traps: mistake → fix
Mistake: Turn on retries and move on
Fix: real bugs hide and the suite slows.
Mistake: Block the release until all flaky tests are fixed
Fix: use quarantine with owners.
Mistake: Delete the 12 flaky tests
Fix: you lose coverage; cover the risk another way.
Mistake: Fix failing tests one by one from the top
Fix: group by cause first.
Easy to hard
Questions interviewers ask, easy to hard
- Your manager says: turn on three retries and move on. What do you say?
- 340 tests turned red after a UI redesign. What do you do in the first hour?
- How do you measure how flaky a test is?
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.