liveBook · Manning

End-to-end testing

As explained in The Art of Unit Testing 3e

A system end-to-end test verifies behavior through the complete running system and its operational boundaries.

End-to-end (E2E) testing checks whether an application works as a complete, running system rather than only as separate pieces. It provides strong confidence because a scenario exercises the glue between layers, including orchestration with dependencies such as databases and third-party systems. section 10.2.1 section 10.5

That confidence comes with a cost. Compared with unit and component tests, E2E tests are slower, more complex, harder to maintain and debug, and more prone to flakiness. Lower-level tests run quickly and are easier to maintain, but passing them alone does not establish that the application works as one integrated unit. section 10.2.2 section 10.5

An E2E-only strategy is an antipattern. The first broad scenario can validate many paths and connections at once, but later E2E tests often repeat those same dependencies and glue. Their added confidence shrinks while their running, reading, changing, and debugging costs remain high. section 10.2.1 section 10.5

Use E2E tests as part of a balanced test strategy:

  • Keep a few E2E tests for the most important functionality, where confidence in the complete running system matters most. section 10.5
  • Cover variations at lower levels when a prior E2E test has already established that the main cross-layer glue works. section 10.2.1
  • Avoid relying only on unit and component tests, because teams may otherwise need manual testing and debugging before release. section 10.2.2
  • Judge the chosen test level by confidence, execution speed, maintainability, complexity, and flakiness. section 10.5
Figure 10.2 End-to-end-only test antipattern
10-02

This diagram highlights the risk of a build dominated by high-level E2E tests: broad coverage is offset by slow, flaky, difficult-to-maintain feedback. section 10.2.1

How The Art of Unit Testing 3e covers it

How deep it goes
Explains E2E trade-offs and diminishing returns, but defers detailed test implementation and scenario design.
Examples
Illustrates an E2E-only build pattern and contrasts it with a low-level-only testing pattern.
What you can do after
Evaluate/understand where a small number of E2E tests adds confidence without creating an E2E-only build.
How it connects
Contrasts E2E testing with unit, component, integration, and API testing, plus delivery and discovery pipelines.

Also explained in

Compare how 12 books explain end-to-end testing →

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.