Skip to catalogue

52

end-to-end test

also e2e

A script that drives the real UI through a real user path. Slow, few, precious.

What is end-to-end test?

E2E tests click the product like a user: browser, network, database. They catch wiring the unit tests cannot see. They are expensive and flaky if you have too many.

Why does end-to-end test matter when vibe coding?

Models generate 40 e2e files for every button. You wanted three: sign up, the money path, the permission denial. Name e2e and name the budget.

How do you do end-to-end test?

Cap e2e at the paths that lose money or leak data. Everything else is a unit or integration test. Run e2e on CI, not on every save.

How do you ask a model for end-to-end test?

Add at most one e2e for (user path). Do not e2e every button. Unit-test the rest. The e2e must not depend on wall-clock sleeps; wait for the UI.

What goes wrong with end-to-end test?

`sleep(5000)` as a wait. That is how e2e becomes flaky. Wait for the element, not the clock.

adjacent