All jobs / Full-stack developer / Testing
Full-stack developer interview question · 5+ years
Every pull request wants the browser suite, and staging is also where the product team demos.
Where should the end-to-end suite run in CI — against shared staging, or against a stack built for the run?
The strongest answer
An ephemeral stack per pull request — the build under test, its own database, its own seed — and a smaller suite against staging on a schedule to catch environment and data drift
Why it works
Right — per-run isolation makes results trustworthy and parallel, and the scheduled staging run still catches what an isolated stack cannot.
What a good answer covers
- Isolate the stack per run.
- Build under test, own database.
- Keep a scheduled staging run.
- Never run write suites on production.
Answers that fall short
- Close, but not the strongest: Against staging, but queue the runs so only one pull request uses it at a time
It removes the collisions and adds a queue: pull requests wait, and a demo on staging still breaks the run. - Weak: On each developer’s machine before they open the pull request; CI runs only the unit tests
Nobody runs the slow suite every time; a check you cannot enforce is a check you do not have. - Red flag: Against production with a test account — it is the only environment that is really true
A full write suite against production creates real records, real emails and real charges; an interviewer hears an incident waiting.
Who gets asked this
More Testing questions
- 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?
- 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?