Testing Strategy and Test Pyramid Approach Questions
Understand test pyramid (unit, integration, E2E), testing types (functional, performance, security, usability, compliance), optimal ratios, and how to balance coverage vs. effort. Know when to prioritize manual vs. automated testing and justify decisions based on risk and ROI.
EasyTechnical
51 practiced
Technical task (Python, pytest): write pytest unit tests for the following function signature: def calculate_discount(price: float, percentage: float) -> floatRequirements: cover a normal case (e.g., price 100, percentage 15), a zero percentage (returns original price), and an invalid negative price (should raise ValueError). Provide only the test code (no implementation), using pytest conventions and parameterization where appropriate.
EasyTechnical
35 practiced
Describe common test coverage metrics (line/statement, branch, function/method, and mutation). Explain their strengths and limitations, and give concrete examples where high line coverage still misses bugs. Briefly describe how mutation testing differs and why it can expose weak tests.
MediumTechnical
39 practiced
You're QA for a microservices-based e-commerce platform with a rich Single-Page Application front-end. Propose an initial test pyramid ratio (approximate percentage distribution across unit, integration/service, and end-to-end tests). Justify your choices based on maintainability, test speed, confidence, and the heavy UI nature of the product, and describe how you'd validate and iteratively adjust the ratios over time.
MediumSystem Design
51 practiced
Design how you would integrate performance testing into a CI/CD pipeline for a web service that must support 10k requests per second (RPS) at peak. Explain when to run smoke load tests vs full load tests vs regression benchmarks, required environments, data isolation strategies, pass/fail criteria, and how to contain costs while getting reliable results.
HardSystem Design
39 practiced
How would you test runtime feature flags that can be toggled per-tenant and rolled out to partial percentages of users? Design a testing strategy that ensures no leakage between tenants, correct rollout percentages, safe rollbacks, interactions with cached data, and how to validate behavior at unit, integration, canary, and e2e levels. Also include monitoring and rollback automation recommendations.
Unlock Full Question Bank
Get access to hundreds of Testing Strategy and Test Pyramid Approach interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.