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

# End-to-end and browser tests

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

> Drive the app the way a person does, through a few journeys that matter. Find elements by role and label, wait for state, and never sleep.

**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`.

## Required

- [Cover only the critical journeys](https://agentwranglers.se/playbook/testing/end-to-end-and-browser-tests/critical-journeys): 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.
- [Find elements the way people do](https://agentwranglers.se/playbook/testing/end-to-end-and-browser-tests/stable-selectors): Find elements by their role, label or visible text. Never by CSS classes or page structure that change with the design.
- [Wait for the page to be ready instead of sleeping](https://agentwranglers.se/playbook/testing/end-to-end-and-browser-tests/no-sleeps): In every asynchronous test, wait for a condition, such as a heading appearing or a queue emptying. Never pause for a fixed time.
- [Run browser tests against the production build](https://agentwranglers.se/playbook/testing/end-to-end-and-browser-tests/test-the-built-app): Run end-to-end tests against the same build you deploy, with production settings, not against a development server.

## Recommended

- [Test in more than one browser and size](https://agentwranglers.se/playbook/testing/end-to-end-and-browser-tests/browsers-and-sizes): Run the critical journeys in at least two browser engines, at phone and desktop width.
- [Smoke test every deploy](https://agentwranglers.se/playbook/testing/end-to-end-and-browser-tests/smoke-test-every-deploy): Right after each deploy, run a few fast, read-only tests against the live address. Roll back when one fails.

- Previous: [Integration and contract tests](https://agentwranglers.se/playbook/testing/integration-and-contract-tests)
- Next: [Test data and environments](https://agentwranglers.se/playbook/testing/test-data-and-environments)
- [All chapters](https://agentwranglers.se/playbook/testing)
