What is end-to-end (E2E) testing?

Answer

End-to-end (E2E) testing tests the entire application flow from the user interface to the database, verifying that the complete system works as expected from a user's perspective. It simulates real user scenarios through the full stack: browser → frontend → backend → database and back. Examples: a user can sign up, log in, create a product, checkout, and receive an email — all tested as one complete flow. Tools: Playwright (Microsoft — fast, cross-browser, highly recommended), Cypress (JavaScript-centric, good DX), Selenium (older, widely supported), Puppeteer (Chrome/Chromium). Characteristics: slow (seconds to minutes per test), brittle (UI changes break tests), expensive to maintain, but high confidence. At the top of the testing pyramid — fewer E2E tests, more unit tests. Best practice: use E2E for critical user journeys only (login, checkout, core workflows).