InterviewStack.io LogoInterviewStack.io

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.

MediumTechnical
41 practiced
In Python using pytest, implement a marker/decorator named `@pytest.mark.slow` and a small integration that skips tests marked slow when the environment variable SKIP_SLOW is set to 'true'. Provide the minimal code and describe how you would configure this behavior in CI.
MediumTechnical
38 practiced
You inherit a monolithic application with 10% unit-test coverage but many slow, brittle integration tests. Create a phased plan (0–3 months, 3–6 months) to increase confidence using test-pyramid principles while keeping feature delivery uninterrupted. Include tooling, quick wins, and ways to measure progress.
MediumBehavioral
34 practiced
Describe a time when you led a cross-functional effort to shift testing left (earlier) in the development lifecycle. Explain strategy, stakeholder engagement, training, tool changes, pilot outcomes, and the KPIs you used to measure success. Use concrete metrics where possible.
MediumTechnical
34 practiced
Compare bottom-up (unit-first) and top-down (e2e-first) approaches for starting a test strategy on a mature, unstable codebase. From an SDET point-of-view, discuss pros/cons, which aligns better with the test pyramid, and concrete signals that would make you choose one approach over the other.
HardTechnical
36 practiced
Implement a Python function `prioritize_tests(tests)` where each test record contains historical_failure_rate (0..1), recent_churn_score (0..1), and execution_time_seconds. Devise a scoring formula that prioritizes flaky and recently-changed tests but penalizes very long tests. Return the tests sorted by descending priority and explain your weight choices.

Unlock Full Question Bank

Get access to hundreds of Testing Strategy and Test Pyramid Approach interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.