---
title: "Test strategy · Agent Wranglers"
url: https://agentwranglers.se/playbook/testing/test-strategy
updated: 2026-10-20
licence: "All rights reserved"
---

# Test strategy

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

> Decide what to test before writing tests. Spend the effort where bugs would hurt most, keep most tests small, and ship every change with its tests.

**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/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.
- [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.
- [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.

- Next: [Unit tests](https://agentwranglers.se/playbook/testing/unit-tests)
- [All chapters](https://agentwranglers.se/playbook/testing)
