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.

HardSystem Design
102 practiced

For a cross-platform codebase (for example, Flutter or React Native) that includes some native modules, propose how to allocate testing responsibility: which logic to cover with unit tests in the shared code, which native-specific features require per-platform tests, and how you would combine native UI tests with cross-platform end-to-end tests to minimize duplicated effort while maximizing coverage.

MediumTechnical
63 practiced

Your mobile product uses feature flags extensively. Design a testing strategy that validates feature-flagged code paths across unit tests, staged-rollout validation, and end-to-end permutations, in continuous integration, without exploding the total number of tests. Discuss API-driven flag control for tests and safeguards to prevent false positives or false negatives caused by the flags themselves.

EasyTechnical
58 practiced

Explain the test pyramid and how it applies specifically to mobile application development. Describe what kinds of tests belong at each level (unit, integration, UI, and end-to-end), give approximate percentage targets for test distribution in a mature mobile project, and explain how and why the pyramid differs from a backend or web application, considering device fragmentation, UI complexity, and platform tooling constraints. Include the specific distinction between an integration test (for example, local-database-plus-repository interactions) and a UI test (for example, navigation and visual states) on mobile, and name recommended tools for unit, integration, UI, and end-to-end tests on native iOS, native Android, and React Native.

HardBehavioral
51 practiced

Tell me about a time you advocated for improving testing practices on a mobile engineering team. Describe the problems you observed, the changes you proposed (tools, process, or refactoring), how you prioritized and implemented them, the metrics you used to measure success, and how you handled resistance from teammates or product managers.

MediumTechnical
66 practiced

Design an integration-testing approach for a mobile app that uses a local database (such as Room or SQLite), a REST API backend, and a background sync worker. Describe which layers you would test together, how you would simulate backend behavior (stubs, mocks, or a test server), how you would validate resulting database state and background work, and how to keep these tests fast and reliable in CI.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.