All jobs / Full-stack developer / Testing
Full-stack developer interview question · 5+ years
A web client and an API, a forty-minute suite that fails often, and a team that re-runs it until it is green.
You inherit a slow, flaky suite the team has learned to ignore. What is your strategy for the next quarter?
The strongest answer
Quarantine the flaky tests on a deadline to fix or delete, move coverage down into fast unit and contract tests, and keep a short end-to-end set for the journeys that earn money
Why it works
Right — a suite people trust is the goal, and speed plus honesty about what each layer buys you is how you get there.
What a good answer covers
- Trust first, coverage second.
- Quarantine flakes with a deadline.
- Push tests down the pyramid.
- Keep end-to-end short and meaningful.
Answers that fall short
- Close, but not the strongest: Set a coverage target for both repositories and hold pull requests to it until quality improves
Coverage percentages move without the suite becoming trustworthy; a flaky test at ninety per cent coverage still teaches people to re-run. - Weak: Rewrite the end-to-end suite in a newer framework; the flakiness is mostly the tool
A new tool does not fix shared data, missing waits and a suite that tests everything through the browser. - Red flag: Make the suite non-blocking so people can merge on red, and fix the tests when there is time
A permanently non-blocking suite is a deleted suite that still costs money to run — and interviewers hear it as tolerating red.
Who gets asked this
More Testing questions
- You built a feature that touches a React screen and two API endpoints. Which tests do you write, and where?
- You are writing your first tests for a POST endpoint. What do you actually assert?
- How do you keep the real API out of a component test without the test drifting from the real thing?
- Do you test this against a real database or against a mocked repository?
- How do you test the parts that are not a request — an incoming webhook and a nightly job?
- Someone deleted a required field and merged because the unit tests still passed. What should CI do?
- The end-to-end suite passes alone and fails when it runs in parallel. What is wrong with the test data, and…
- How do you stop the API from breaking the UI in CI?