1. A data platform team is implementing a testing strategy for a new Databricks pipeline. A junior engineer proposes running only end-to-end (E2E) tests in production after each deployment to verify correctness. A senior engineer argues this approach is insufficient. Which statement BEST explains why relying solely on E2E tests in production is problematic?
- A. End-to-end tests cannot be run in Databricks; they must be run in a separate testing framework outside the platform.
- B. End-to-end tests validate the full pipeline but are slow, expensive to run, and provide little guidance on which specific component failed when an issue is detected; earlier-stage unit and integration tests catch bugs faster and at lower cost.✓ Correct
- C. End-to-end tests are only valid for streaming pipelines; batch pipelines require unit tests exclusively.
- D. Running tests in production is acceptable as long as the tests use a separate catalog or schema to isolate test data from production data.
Explanation
E2E tests validate that the entire pipeline produces correct results but are costly to run (require full-scale infrastructure and data), slow to execute, and provide poor fault localization — when they fail, the engineer must investigate the entire pipeline to find the root cause. A layered testing strategy (unit tests → integration tests → E2E → UAT) catches bugs early when they are cheapest to fix. Option A is incorrect because E2E tests can absolutely be run in Databricks; the platform supports various testing frameworks. Option C is incorrect because the streaming vs. batch distinction does not determine which test types are applicable; both pipeline types benefit from all levels of testing. Option D is incorrect because while test isolation using separate schemas is a good practice, running all tests only in production (even in isolated schemas) still exposes the production environment to risk and does not address the fundamental inadequacy of relying solely on E2E tests.