---
title: "Testing checklist: all 35 rules · Agent Wranglers"
url: https://agentwranglers.se/playbook/testing/checklist
updated: 2026-10-20
licence: "All rights reserved"
---

# Testing checklist

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

Every rule in the testing playbook, by chapter, required rules first. Each links to its own page with how we built it and how to check it.

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

## Test strategy

- [ ] **Required** [Test what would hurt to break](https://agentwranglers.se/playbook/testing/test-strategy/test-by-risk): Put the most tests where a bug would cost money, data or trust. Code that cannot break silently needs few tests.
- [ ] **Required** [Shape the test suite like a pyramid](https://agentwranglers.se/playbook/testing/test-strategy/test-shape): Write many small, fast tests and only a few slow, wide ones. Each kind of test checks what only it can check.
- [ ] **Required** [Ship tests in the same change](https://agentwranglers.se/playbook/testing/test-strategy/tests-with-the-change): Every change that adds or changes behaviour includes the tests for it. A bug fix starts with a test that fails before the fix.

## Unit tests

- [ ] **Required** [Test behaviour through the public interface](https://agentwranglers.se/playbook/testing/unit-tests/unit-behaviour): A unit test calls a function or class the way callers do, and checks what it returns or changes.
- [ ] **Required** [Fake the clock and the network in unit tests](https://agentwranglers.se/playbook/testing/unit-tests/unit-deterministic): Unit tests never depend on the clock, random numbers or the network. They pass on any day, on any machine.
- [ ] **Required** [Test the edges and the errors](https://agentwranglers.se/playbook/testing/unit-tests/test-the-edges): For every rule with a limit, test the values on both sides of it. For every input that can be rejected, test the rejection.
- [ ] **Recommended** [Arrange, act and assert](https://agentwranglers.se/playbook/testing/unit-tests/arrange-act-assert): Write each test in three parts. Set up the data, do one action, then check the result.
- [ ] **Recommended** [Give each test one reason to fail](https://agentwranglers.se/playbook/testing/unit-tests/one-reason-to-fail): Each test checks one behaviour. When it fails, its name tells you what broke.
- [ ] **Recommended** [Keep unit tests fast](https://agentwranglers.se/playbook/testing/unit-tests/fast-unit-tests): Each unit test runs in milliseconds, and the whole unit suite runs in seconds.

## Integration and contract tests

- [ ] **Required** [Test against the same database engine](https://agentwranglers.se/playbook/testing/integration-and-contract-tests/same-database-engine): Test database code against the same database engine and version as production, never against a different engine or a mock.
- [ ] **Required** [Check the contract between services](https://agentwranglers.se/playbook/testing/integration-and-contract-tests/contract-tests): When two services you own talk to each other, test the shape of their messages on both sides with a shared contract.
- [ ] **Recommended** [Fake only what you do not own](https://agentwranglers.se/playbook/testing/integration-and-contract-tests/doubles-at-the-edge): Replace only outside services, such as a payment provider or an email API, with test doubles. Run your own code as it runs in production.
- [ ] **Optional** [Check that outside services still match your fakes](https://agentwranglers.se/playbook/testing/integration-and-contract-tests/verify-the-fakes): At least once a week, run a small test against each outside service to prove your fakes still behave like it.

## 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.
- [ ] **Required** [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.
- [ ] **Required** [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.
- [ ] **Required** [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.
- [ ] **Recommended** [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.

## Test data and environments

- [ ] **Required** [Give each test its own data](https://agentwranglers.se/playbook/testing/test-data-and-environments/isolated-test-data): Each test creates the data it needs and leaves nothing behind that another test could see.
- [ ] **Required** [Keep a staging copy with fake data](https://agentwranglers.se/playbook/testing/test-data-and-environments/production-like-staging): Keep a staging environment that runs the same build, settings and service versions as production, with fake data.
- [ ] **Recommended** [Build test data with factories](https://agentwranglers.se/playbook/testing/test-data-and-environments/data-factories): Create test data with small factory functions that fill sensible defaults. Each test sets only the fields it cares about.

## Flaky and slow tests

- [ ] **Required** [Quarantine flaky tests with an owner](https://agentwranglers.se/playbook/testing/flaky-and-slow-tests/quarantine-flaky-tests): Move a test that fails at random out of the blocking suite at once. Give it an owner and a deadline, then fix or delete it.
- [ ] **Recommended** [Find hidden order dependencies](https://agentwranglers.se/playbook/testing/flaky-and-slow-tests/random-order): Run tests in a random order, so tests that depend on each other fail early.
- [ ] **Recommended** [Find flaky tests before they merge](https://agentwranglers.se/playbook/testing/flaky-and-slow-tests/repeat-new-tests): Run new and changed tests many times in a row before merging, to catch flakiness while the change is fresh.
- [ ] **Recommended** [Keep the suite within a time budget](https://agentwranglers.se/playbook/testing/flaky-and-slow-tests/suite-time-budget): Set a time limit for the whole suite, such as ten minutes, and for each kind of test. Treat going over it as a failure.

## Test quality

- [ ] **Required** [Make every test able to fail](https://agentwranglers.se/playbook/testing/test-quality/tests-can-fail): Every test must contain a check that fails when the behaviour breaks. Tests without assertions or with always-true checks are not tests.
- [ ] **Recommended** [Prove the tests catch bugs](https://agentwranglers.se/playbook/testing/test-quality/mutation-testing): Run mutation testing on the high-risk modules from the [risk list](https://agentwranglers.se/playbook/testing/test-strategy/test-by-risk). It changes the code on purpose and checks that at least one test fails for each change.
- [ ] **Recommended** [Treat coverage as a floor](https://agentwranglers.se/playbook/testing/test-quality/coverage-floor): Use line and branch coverage to find untested code and to stop it falling. Never treat a high number as proof of good tests.
- [ ] **Recommended** [Review tests like code](https://agentwranglers.se/playbook/testing/test-quality/review-tests): Review test code with the same care as production code. It must be clear, small and free of copy and paste.
- [ ] **Recommended** [Keep snapshot tests small and reviewed](https://agentwranglers.se/playbook/testing/test-quality/small-snapshots): Use snapshots only for small, stable output. Review every snapshot change like code, and never accept new snapshots without reading them.

## Non-functional tests

- [ ] **Required** [Check accessibility in every build](https://agentwranglers.se/playbook/testing/non-functional-tests/accessibility-in-ci): Run an automated accessibility check on every page or screen in the test suite, and fail the build on any violation.
- [ ] **Required** [Grade AI features against fixed examples](https://agentwranglers.se/playbook/testing/non-functional-tests/llm-evals): Test every AI feature against a fixed set of graded examples, and fail the build when the score drops.
- [ ] **Recommended** [Test load against a budget](https://agentwranglers.se/playbook/testing/non-functional-tests/load-tests): Before a launch or a big change, load test the busiest routes and fail when response times or errors pass a set budget.
- [ ] **Recommended** [Fuzz every parser of untrusted input](https://agentwranglers.se/playbook/testing/non-functional-tests/fuzz-parsers): Feed generated and random input to every parser of outside data, and turn every crash into a regular test.
