GuideNo-code11 min read

End-to-End Testing (E2E): Definition, Examples and Automation

What is end-to-end testing? Definition, how E2E differs from unit and regression tests, a checkout example and how to replay a journey without code.

Contents
  1. What is an end-to-end test?
  2. E2E vs unit vs integration tests: what is the difference?
  3. E2E testing and regression testing: two different questions
  4. Example: an end-to-end checkout journey
  5. When should you automate an E2E test?
  6. Replaying an end-to-end journey without writing code
  7. Comparison table: unit, integration, E2E and regression tests
  8. FAQ

An end-to-end test (E2E test) checks a complete journey through an application, from the first screen to the final result, the way a user would. It does not test an isolated function: it opens a real browser, clicks, fills in forms and checks that the order, the sign-up or the payment really goes through.

This guide explains what end-to-end testing is, how it differs from unit tests, integration tests and regression testing, and when it is worth automating. It then walks through a concrete example on a checkout journey that anyone can run on a public demo store. It ends with how to replay that journey on every release without writing code.

What is an end-to-end test?

An end-to-end test goes through the whole application, interface, server, database and external services included, following the path of a real user. It answers a single question: can the person finish what they came to do?

Take an online store. Developers can test that the function computing a discount returns the right amount. They can test that the cart saves an item in the database. None of these tests guarantees that a customer can pick a product, enter an address, pay and receive a confirmation. The E2E test replays exactly that path.

Three traits define it:

  1. It starts from the interface. The test acts on the screens the user sees: buttons, fields, lists, error messages.
  2. It uses the real system. The browser calls the real server, which reads the real database (or a test copy). Nothing is mocked in the middle.
  3. It checks a business outcome. Success is not a technical value but what the user gets: a confirmed order, an account created, a document downloaded.

You will also hear it called a journey test or, in some teams, a system test. The terms vary, the idea stays the same: check the application as it will be used.

This realism has a cost. An E2E test is slower than a unit test, because it loads pages and waits for server responses. It is also more fragile: a network delay, a piece of data already used or a renamed button is enough to make it fail. That is why teams do not write thousands of them and keep them for the journeys that matter.

E2E vs unit vs integration tests: what is the difference?

The difference lies in what each test covers. A unit test checks a small part of the code, isolated from the rest. An integration test checks that two or three parts talk to each other correctly. An E2E test checks the whole application from the user's point of view.

This balance is often shown as the test pyramid, popularized by Mike Cohn and taken up by Martin Fowler in his article “TestPyramid”. At the base, many unit tests, fast and cheap. In the middle, integration tests. At the top, a few E2E tests, slower and costlier to maintain, but the only ones that prove the journey works.

On our store, it looks like this:

  • Unit test: the discount function correctly applies 10% to the subtotal.
  • Integration test: the cart service saves the item and the pricing service returns the right total.
  • E2E test: a customer opens a tracksuit page, picks a size, adds the item to the cart, enters a promo code, pays and sees the confirmation.

The three levels do not replace each other. A failing unit test points to the faulty line of code in seconds. A failing E2E test only says the journey is broken, and you then have to find where. Conversely, hundreds of green unit tests do not prove that a “Pay” button can be clicked on the real screen.

The pyramid has a limit that people often forget: none of these levels looks at the screen. An E2E test can pass while the payment button is hidden under a banner or the price is displayed white on white. We cover this point in our article on the test pyramid and checking the display.

E2E testing and regression testing: two different questions

An E2E test and a regression test do not answer the same question. The E2E test describes the scope of the test: a complete journey. The regression test describes its purpose: checking that what worked yesterday still works after a change. The same test can therefore be both at once.

Regression testing is replayed on every new version. It can be unit, integration or E2E. What defines it is repetition: you fix a known state, then check after each change that nothing has drifted from it by accident.

In practice the two notions often meet. A team writes an E2E test to validate a new payment journey. Once the journey ships, the same test is replayed on every following version: it becomes a regression test. The most useful E2E journeys thus form the core of a web application's regression campaign.

The difference shows in what is checked:

  • A classic E2E test checks assertions written in advance: “the title contains Thank you”, “the cart shows the discount”.
  • A regression test compares the current state to a reference: everything that changed since the last validated version is flagged, including what nobody thought to check.

This second approach is what catches unexpected regressions: a margin that moved, a block that disappeared, a truncated label. Our guide to automated regression testing details the method and how to build a campaign.

Example: an end-to-end checkout journey

To make things concrete, let's use GoodDeal, Delta-QA's public demo store, built for practicing test automation. Its pages are identical on every visit, its test data is displayed and no order is real. Anyone can replay the example below.

The happy path, step by step

The E2E scenario follows a customer buying a tracksuit:

  1. Open the product page of the Delta Tech Fleece Tracksuit.
  2. Choose size M (a size is required before adding to the cart).
  3. Click “Add to Cart”, then open the cart.
  4. Enter the promo code DEMO10 and check that the 10% discount appears.
  5. Go to checkout and fill in the delivery address.
  6. Pay with the test card 4242 4242 4242 4242.
  7. Check the confirmation page: the title thanks the customer and an order number is displayed.

Each step depends on the previous one. If the size can no longer be selected, everything after it fails. That is exactly what you expect from an E2E test: it breaks where the customer would be stuck.

The error case not to forget

A complete E2E journey also tests what must fail. On GoodDeal, the card 4000 0000 0000 0002 is always declined. The test replays the same purchase with this card and checks three things: the message “Your card was declined” appears, no order is created and the customer stays on the payment page with the cart intact.

This error case is often the one that gets forgotten. Yet it is the one a customer experiences the worst: a declined card with no clear message means a lost sale and sometimes a call to support.

The same test in Playwright

With a framework such as Playwright, the happy path is written like this:

test('end-to-end purchase', async ({ page }) => {
  await page.goto('https://delta-qa.com/playground/product?id=tech-fleece-tracksuit');
  await page.getByRole('radio', { name: 'M', exact: true }).check();
  await page.locator('#add-to-cart').click();
  await page.goto('https://delta-qa.com/playground/cart');
  await page.locator('#promo').fill('DEMO10');
  await page.getByRole('button', { name: 'Apply' }).click();
  await expect(page.locator('#cart-discount-row')).toBeVisible();
  await page.goto('https://delta-qa.com/playground/checkout');
  // ... address, then test card 4242 4242 4242 4242
  await page.locator('#place-order').click();
  await expect(page.locator('#order-title')).toContainText('Thank you');
});

The order number changes with every purchase, on purpose: the test therefore checks its presence, not its value. The full code is detailed in our Playwright tutorial.

When should you automate an E2E test?

Automate an E2E test when the journey is critical to the business, is replayed on every release and stays stable enough not to be rewritten every week. Other journeys are perfectly well checked by hand, or by tests lower in the pyramid.

Good candidates are easy to spot:

  • Journeys that earn money: purchase, sign-up, subscription, booking. An outage there costs revenue directly.
  • Journeys replayed on every delivery: login, search, main dashboard. Redoing them by hand every sprint wears the team out and ends up being rushed.
  • Journeys that touch many components: payment, export, sending an email. These are what break when a dependency changes.

Conversely, do not automate too early a screen that still changes every week. The test would have to be redone with every mockup. Wait until the journey is stabilized, then lock it in.

The main enemy of an E2E suite is instability, what teams call flaky tests: tests that fail one day and pass the next without the code having changed. The causes are almost always the same:

  • poorly handled waits (the test clicks before the button is ready);
  • shared data (two tests use the same account or the same stock);
  • content that changes by itself (today's date, order number, random banner);
  • fragile selectors (a renamed identifier, a reordered list).

A useful E2E suite stays short: ten to a few dozen well-chosen journeys beat hundreds of tests that nobody dares to look at when they turn red. Another family of fast tests, smoke testing, checks right after a deployment that the application starts and its main pages respond; it complements the E2E suite without replacing it.

Replaying an end-to-end journey without writing code

An E2E test does not have to be written in TypeScript or Python. No-code test automation tools record the journey while you perform it in the browser, then replay it on their own on every version. This is Delta-QA's approach.

It works in three steps:

  1. Record. You go through the journey once in a real browser: product page, size, cart, promo code, payment. Delta-QA records every click and every entry, and captures a reference of each step.
  2. Replay. On every new version, Delta-QA performs the same journey in Chrome (Chromium), with no intervention. If a button was moved or renamed, it finds it again on replay: the scenario does not need to be redone. If it has disappeared, Delta-QA does not click elsewhere and reports it.
  3. Compare. Each step is compared to its reference the way a human eye would. Delta-QA spots the elements that changed and names them in the report: a button that went from blue to green, a margin that moved, a block that disappeared. You judge each change, intended or bug.

This comparison covers what a script's assertions miss. The Playwright test above checks that the title contains “Thank you”. It does not see that the order summary lost a line, or that the “Place order” button slipped under the footer. The comparison with the reference sees it, because it looks at the whole screen.

Areas that change on every visit are handled without code too. On GoodDeal, the order number on the confirmation changes with every purchase: you mark it as an area to ignore, and the rest of the page is compared normally. Sign-up journeys can be replayed as well: a fresh email address on every run, the confirmation email followed all the way through.

This approach does not replace developers' unit tests. It gives testers, product owners and project managers a way to keep critical journeys under control without depending on a script to maintain. To go further, our guide to automating tests without a developer details how to set up a first campaign.

Comparison table: unit, integration, E2E and regression tests

Criterion Unit test Integration test E2E test Regression test
What it checks An isolated function The dialogue between a few components A complete user journey That nothing changed by accident
Point of view The code The services The user The previous validated version
Speed Milliseconds Seconds Seconds to minutes Depends on the level replayed
Usual quantity Hundreds or thousands Tens to hundreds A few dozen The whole campaign, on every version
Who writes it most often Developers Developers Developers or testers Testers, QA, product owners
What it tells you on failure The faulty line The faulty component The broken journey What changed and where
Looks at the screen? No No Only what is checked Yes, if the comparison is visual
Example on GoodDeal 10% discount computed Cart saved with the right price Full purchase through to the confirmation Purchase replayed and compared on every version

FAQ

What does E2E mean?

E2E is short for end-to-end. An E2E test checks an application over a complete journey, from the first page to the final result, through the interface, the server and the database, the way a real user would.

What is the difference between an E2E test and a functional test?

A functional test checks that a feature does what its specification says, at any level. An E2E test is a particular form of it: it checks several features chained together over a complete journey, under real conditions of use.

How many E2E tests should you write?

Few, but well chosen. Start with the three to five journeys that earn the most money or block the most users when they fail: purchase, sign-up, login. Add more as incidents happen, rather than aiming for full coverage from the start.

Which tools should you use for E2E tests?

On the code side, the most widespread open source frameworks are Playwright, Cypress and Selenium. On the no-code side, tools like Delta-QA record the journey in the browser and replay it without a script. The choice mostly depends on who writes and maintains the tests in your team.

Can you do E2E testing without knowing how to code?

Yes. A no-code tool records the journey while you perform it, then replays it on every version. To practice, a public demo store like GoodDeal lets you test a complete purchase, a declined card or a promo code with no risk at all.

Try Delta-QA