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
52 practiced

Design a test-level strategy for a large microservices architecture (roughly 200 services) with frequent deployments and high throughput. Define what kinds of tests you would place at each pyramid level for an individual service and across service boundaries, the role contract testing and test virtualization play, and how you would keep pull-request feedback fast while still trusting your end-to-end coverage.

EasyTechnical
63 practiced

Explain the differences between smoke tests, regression tests, integration tests, system tests, and user-acceptance tests, and between functional and non-functional testing. For each, describe when it should be executed in a typical CI/CD pipeline and give one concrete example test appropriate for an e-commerce web application.

EasyTechnical
58 practiced

Explain the test pyramid concept. Describe its tiers (unit, integration, and end-to-end), the primary goal of each tier, and why the pyramid recommends many more low-level tests than high-level tests. For a typical web application, give concrete examples of test types and common tools at each tier (for instance, unit tests for helpers, integration tests for API-to-database interactions, end-to-end tests for a checkout flow), and briefly mention limitations or scenarios where the pyramid shape may not apply.

MediumTechnical
58 practiced

As a Test Automation Engineer, describe where each of the following should execute in a CI/CD pipeline for a typical web application: unit tests, component tests, integration tests, UI (Selenium-style) tests, and performance tests. For each type, explain the trade-off between speed and confidence it represents, and suggest a gating strategy: which types should be able to block a merge, and which should run later without blocking developers.

HardBehavioral
98 practiced

Tell me about a time you discovered a production bug that was caused by missing or insufficient tests. Using the STAR structure, describe the situation, the task you were responsible for, the actions you took to fix the bug and improve the tests or process (including which test level was missing and why), and the measurable result afterward.

Unlock Full Question Bank

Get access to all 21 Test Levels and the Test Pyramid interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.