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.

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.

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.

MediumTechnical
96 practiced

Explain how contract testing (for example, using Pact) can be used for a mobile client that consumes a REST API. Describe where the consumer's contracts should live, how provider validation works in the backend team's CI, and the trade-offs compared to relying on full end-to-end integration tests against a real or staged backend.

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.