Frequent questions: how many E2E tests, which tool, and how to reduce flakiness.
- How many E2E tests?
10-50 for the median SaaS. Cover the flows whose failure costs revenue: sign-up, login, checkout, payment, API authentication, critical integrations. Everything else is integration or unit.
- Playwright, Cypress or Selenium?
Playwright (2020) is the modern default — better cross-browser, better async, faster. Cypress remains strong for component-style E2E. Selenium only for legacy suites.
- How do I reduce flakiness?
Four levers: (1) isolate data per test (unique emails, unique orders), (2) freeze time and random, (3) run against a per-test environment (container, ephemeral DB), (4) retry only known-flaky tests and track them explicitly.
- Should E2E run on every commit?
On the critical subset (10-20 tests), yes. The full E2E suite runs nightly or pre-release. Every-commit full E2E is a CI bottleneck that costs more than it saves.