All jobs / Full-stack developer / Testing
Full-stack developer interview question · 3–5 years
Someone deleted a required field and merged because the unit tests still passed.
What should CI do?
The strongest answer
Fail the build on a breaking OpenAPI diff unless the PR labels an intentional version bump — additive changes pass
Why it works
Exactly. The spec is a contract test. Breaking should be loud and opt-in, not a surprise in the iOS build next week.
What a good answer covers
- Breaking OpenAPI = red CI.
- Additive = green.
- Intentional breaks bump a version on purpose.
- Docs generation is not a compatibility check.
Answers that fall short
- Close, but not the strongest: Regenerate the HTML docs and call it verification
Pretty docs do not catch a removed required field. - Weak: Diff the spec only on release day
Release day is when you no longer have time to undo it. - Red flag: Ban OpenAPI in CI; it slows the team
The slowness of a spec diff is cheaper than a silent break.
Who gets asked this
More Testing questions
- 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?
- Where should the end-to-end suite run in CI — against shared staging, or against a stack built for the run?
- What would you run against production itself, and what must such a check never do?
- You inherit a slow, flaky suite the team has learned to ignore. What is your strategy for the next quarter?
- 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?