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".
Use the testing spectrum to position end-to-end tests beyond Spring-focused integration tests and opposite narrow unit tests. section 1.2
















