Testing interview question · Most asked
How would you design a test strategy for a new web application?
Design Asked in Backend Engineer · QA Engineer / SDET · Frontend Engineer · Full Stack Engineer interviews
Summary
Start from risk: which features matter most to users and the business, and what could break them. Then choose a balanced mix: many fast unit tests, integration tests for databases and services, contract tests between teams' APIs, a small set of end-to-end tests for critical journeys, plus non-functional testing (performance, security, accessibility). Automate them in CI, and decide what stays manual (exploratory testing, usability).
Longer Answer
- Scope and risks: critical journeys (sign-up, checkout), integrations, data correctness, compliance.
- Levels: unit, integration, contract, end-to-end, visual and accessibility checks, performance and security tests.
- Environments and data: ephemeral environments per pull request where possible; seeded, anonymised test data.
- Ownership: developers own unit and integration tests; QA/SDET builds frameworks, tools and the risky end-to-end and exploratory coverage.
- Quality gates: what blocks a merge or release (failing tests, coverage on changed code, critical bugs).
- Feedback: flaky test tracking, escaped-defect analysis, and production monitoring as part of quality.
Key Points
- Start from risk.
- Balanced levels: many unit, few end-to-end.
- Data and environments planned.
- Clear ownership and gates.
- Learn from escaped defects.
Explanation
What interviewers look for
A risk-based, layered strategy with ownership and gates, not 'automate everything with Selenium'.
More Testing questions
- What's the difference between mocks, stubs, fakes and spies?
- What causes flaky tests and how do you fix them?
- What is the test pyramid, and is it still relevant?
- What makes a good unit test?
- Write a Playwright test that logs in and checks the dashboard, and explain how you keep it stable.
- How do you write reliable integration tests that use a database?
- Your end-to-end test suite is flaky and takes an hour. How do you fix it?
- A critical bug reached production even though all tests passed. What do you do?