What evidence does an end-to-end test provide, and why should a suite contain relatively few of them?
Answer
It proves that a realistic business flow crosses integrated components successfully. Because it depends on many systems, data and environments, it is slower and harder to diagnose; narrower tests should cover most rules and failure cases.
Strong answer includes
- integrated business evidence
- diagnostic cost
- balanced test layers
Practical example
A checkout E2E test that goes from adding an item to cart through payment and email confirmation takes eight minutes and touches five services. When it fails, it takes an engineer half a day to find that the real cause was a single validation rule better covered by a two-second unit test, which is why the team keeps only a handful of such E2E tests.