InterviewStack.io LogoInterviewStack.io

Test Levels and the Test Pyramid Questions

How unit, integration, component, end-to-end and contract tests fit together and where each provides the most value. Covers the test pyramid and the competing shapes proposed against it (the testing trophy and the honeycomb), multi-layer test architecture, contract testing as the seam between services, choosing the right level to catch a given class of defect cheaply, and what to run per commit versus per release. Includes the cost and confidence trade-offs between fast low-level tests and slower, broader system tests. The scope is which level a test belongs at and why. Deciding how much to invest in testing and where to prioritize under time pressure is covered separately.

MediumSystem Design
67 practiced

Describe the test pyramid and design a practical testing strategy for a mid-sized microservices product made up of about 20 services. For each layer (unit, integration, contract, and end-to-end), state a target coverage or ratio, who is responsible for it, and how you would implement and enforce the strategy consistently across multiple teams.

HardTechnical
107 practiced

Design an experiment, and the metrics you would use, to empirically validate whether a proposed test-pyramid ratio (for example, 70% unit, 20% integration, 10% end-to-end) actually improves delivery cadence and defect detection for your product. Include how you would form control versus experiment groups, the duration and sample size or statistical considerations involved, your success criteria, and how you would account for confounding variables.

That is every published Test Levels and the Test Pyramid question for Engineering Manager so far. Browse the other topics in this category, or practice this one interactively.