All jobs / Engineering manager / tech lead / Code & Development Practices
Engineering manager / tech lead interview question · 1–3 years
The test suite fails on about one run in five, and the team has learned to hit “re-run”.
What is your policy?
The strongest answer
Treat a flaky test as a broken test: take it out of the blocking suite with a ticket, an owner and a date, fix it or delete it, and keep the quarantine list visible
Why it works
Exactly — out of the blocking path, owned and dated, with the list visible so it cannot quietly grow.
What a good answer covers
- A flaky test is broken.
- Quarantine, with owner and date.
- Fix it or delete it.
- Keep the list visible.
Answers that fall short
- Close, but not the strongest: Ask the team to fix the flaky tests when they have time between features
Good intent, but “when there is time” is exactly how a suite nobody trusts gets built. - Weak: Configure the pipeline to retry failed tests automatically so the noise goes away
Automatic retries hide the flake, and they can hide a real intermittent bug with it. - Red flag: Leave it — re-running is quicker than investigating, and the tests do pass eventually
A suite people re-run until it is green has stopped being a check on anything.
Who gets asked this
More Code & Development Practices questions
- You inherit a team with almost no automated tests. Where do you start?
- Trunk-based development or long-lived feature branches — which do you put a team on, and why?
- The pipeline takes fifty minutes, and most of it is end-to-end tests running against a deployed environment…
- Your organisation releases once a month, in an evening, with everyone on standby. How do you get to weekly or…
- As tech lead, what is code review on your team for?
- A developer asks what the CI pipeline is actually for. What do you tell them?
- When is a story done on your team?
- Pull requests on your team sit for two or three days, and the branches grow while they wait. What do you do?