Fast unit tests can pass while a feature still needs manual checking before release. A high-level test helps close that confidence gap by checking behavior with more real dependencies. The trade-off is slower execution and a greater risk of flaky results. section 10.1 section 10.2.2
A bigger component is not necessarily a high-level test
Suppose one test clicks a button in memory, while another tests a form that contains the button. The form test covers a broader scenario, but both remain unit or component tests if they use no files, databases, networks, or other dependencies outside the test’s control. Scope alone does not determine the test level. section 10.1.2
Choose high-level scenarios deliberately:
- Prefer a faster, lower-level test unless a high-level test is needed to trust that the feature works. section 10.3.3
- Avoid repeating the same scenario at several levels. For example, test a successful login end to end, then use lower-level tests for variations. section 10.3.3
- Keep the important high-level scenarios few and support them with more lower-level tests; one end-to-end test for five or more lower-level tests is a suggested rule of thumb, not a requirement for every feature. section 10.3.3 section 10.5
Keep high- and low-level tests in one coordinated strategy. When separate teams duplicate scenarios in separate pipelines, slow and flaky high-level tests can become costly without adding much confidence. section 10.2.3
