liveBook · Manning

End-to-end testing

As explained in Testing Spring Boot Applications

A test that exercises an application or system from the user’s perspective across its fully assembled components and dependencies.

End-to-end testing exercises a fully assembled application from the user’s perspective, including its external dependencies. It provides the broadest confidence that the system works as a whole, but requires more setup and runs more slowly and fragily than narrower tests. section 1.2

A typical approach deploys the application to a dedicated test or staging environment and runs tests against the running system. Spring Boot tests generally occupy the middle ground as integration tests: they assemble application code with Spring capabilities, and may include a database without covering every external system. section 1.2

Testing a car

Unit tests check individual engine components. Integration tests assemble the engine, ignition, fuel pump, and exhaust to verify that the engine runs. End-to-end tests correspond to checking the complete car from the driver’s perspective. section 1.2

Figure 1.2 The testing spectrum. On one end, unit tests that involve one or a few classes, and no Spring-specific code. On the other end, there are full-blown end-to-end tests, that may involve many complex components, that need tooling beyond the context of Spring. In between those two ends, there is a whole category of "integration tests".
ch01 f02 garniermoiroux

Use the testing spectrum to position end-to-end tests beyond Spring-focused integration tests and opposite narrow unit tests. section 1.2

How Testing Spring Boot Applications covers it

How deep it goes
Defines scope and trade-offs, but stops short of implementation details, tooling, or executable test configuration.
Examples
Uses a deployed staging environment and a car assembled from engine components to illustrate system-level testing.
What it assumes
Distinguishes unit and integration testing before positioning end-to-end testing across the testing spectrum.
What you can do after
Evaluate whether a fully assembled system works as expected from the user’s perspective.
How it connects
Contrasts end-to-end tests with unit tests and integration tests, including Spring Boot integration tests.

Also explained in

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

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Testing Spring Boot Applications. The section links point to the parts of the book it draws on.