---
title: "Cover only the critical journeys · Agent Wranglers"
url: https://agentwranglers.se/playbook/testing/end-to-end-and-browser-tests/critical-journeys
updated: 2026-10-20
licence: "All rights reserved"
---

# Cover only the critical journeys

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Required
- Chapter: [End-to-end and browser tests](https://agentwranglers.se/playbook/testing/end-to-end-and-browser-tests)
- Rule: Write end-to-end tests for the few journeys that must never break, such as sign-up, checkout and booking. Leave the details to faster tests.
- How: List five to fifteen journeys from the [risk list](https://agentwranglers.se/playbook/testing/test-strategy/test-by-risk). Write one test per journey, from the first page to the final result. Test edge cases at lower levels. Run them against the [production build](https://agentwranglers.se/playbook/testing/end-to-end-and-browser-tests/test-the-built-app).
- Check: Every journey on the list has one passing browser test. The browser suite runs in under ten minutes.

Example:

```js
import { test, expect } from '@playwright/test';

test('a visitor can buy a mug', async ({ page }) => {
  await page.goto('/products/mug');
  await page.getByRole('button', { name: 'Add to cart' }).click();
  await page.getByRole('link', { name: 'Checkout' }).click();
  await page.getByLabel('Email').fill('ada@example.com');
  await page.getByRole('button', { name: 'Pay' }).click();
  await expect(page.getByRole('heading', { name: 'Thank you' })).toBeVisible();
});
```

```python
# Playwright for Python
from playwright.sync_api import Page, expect

def test_a_visitor_can_buy_a_mug(page: Page):
    page.goto("/products/mug")
    page.get_by_role("button", name="Add to cart").click()
    page.get_by_role("link", name="Checkout").click()
    page.get_by_label("Email").fill("ada@example.com")
    page.get_by_role("button", name="Pay").click()
    expect(page.get_by_role("heading", name="Thank you")).to_be_visible()
```

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers testing playbook: https://agentwranglers.se/playbook/testing/end-to-end-and-browser-tests/critical-journeys`.

- Next: [Find elements the way people do](https://agentwranglers.se/playbook/testing/end-to-end-and-browser-tests/stable-selectors)
- [End-to-end and browser tests](https://agentwranglers.se/playbook/testing/end-to-end-and-browser-tests)
