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

Design a test pyramid tailored to an ML-enabled recommendation feature. Cover unit tests for data transformation and feature-engineering code, integration and component tests for model scoring and feature stores, model-validation tests (data-quality checks, drift detection, performance thresholds), and end-to-end tests including offline evaluation and online A/B validation. Define acceptance criteria and the monitoring alarms you would use to detect model regressions in production.

EasyTechnical
57 practiced

Explain the test pyramid as it applies to data-engineering pipelines. Describe what belongs at each level (unit, integration, contract, and end-to-end) for a nightly batch ETL job that reads from object storage, transforms data with a distributed processing engine, and writes to a data warehouse, and the trade-off between speed and coverage at each level. Recommend an approximate allocation of engineering effort and CI resources across levels for a medium-sized ETL team, and explain when a team should invest heavily in end-to-end tests versus contract tests for streaming versus batch pipelines. Discuss how designing small, pure transformation functions affects testability at the unit level.

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