liveBook · Manning

High-level test

As explained in The Art of Unit Testing 3e

A higher-level test verifies behavior across relatively broad system boundaries and typically involves multiple components or external interactions.

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

How The Art of Unit Testing 3e covers it

How deep it goes
Details scenario selection, revision, and level ratios through test-recipe rules.
Examples
Contrasts button and form-component tests, then uses successful login to illustrate scenario selection across levels.
What you can do after
Practice/perform test-recipe planning by reserving high-level tests for confidence-critical scenarios and testing variations at faster levels.
How it connects
Connects high-level tests to unit tests, component tests, end-to-end tests, test recipes, and build pipelines.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Art of Unit Testing 3e. The section links point to the parts of the book it draws on.