What end to end tests do
An end to end test launches a real browser, navigates to a running build of the app, and drives it like a user across pages. It can hit a real or seeded backend, giving the highest confidence that the whole system works.
The cost
- Slow browser startup and real navigation take seconds per test.
- Flaky timing, animations, and network can cause false failures.
- Expensive to maintain UI changes ripple into many tests.
Keeping them reliable
- Wait on conditions wait for an element to appear, never a fixed sleep.
- Seed deterministic data so each run starts from a known state.
- Isolate tests so they do not depend on order or shared mutations.
Use them sparingly
Reserve end to end tests for the critical paths such as sign up, checkout, or login. Push detailed cases down to faster integration and unit tests.
A small suite of stable end to end tests beats a large flaky one.
Key idea
End to end tests give full confidence on critical paths but are slow and flaky, so keep the suite small.