---
title: "Test what would hurt to break · Agent Wranglers"
url: https://agentwranglers.se/playbook/testing/test-strategy/test-by-risk
updated: 2026-10-20
licence: "All rights reserved"
---

# Test what would hurt to break

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

- Level: Required
- Chapter: [Test strategy](https://agentwranglers.se/playbook/testing/test-strategy)
- Rule: Put the most tests where a bug would cost money, data or trust. Code that cannot break silently needs few tests.
- How: List the flows that matter most, such as sign-up, payment, booking and data export. Rank each part of the code by how likely it is to break and how bad a break would be. Test the high-risk parts at several levels. Skip tests that only repeat the framework, such as plain getters. Keep the risk list in a file in the repository, so tests and reviews can refer to it.
- Check: Every flow on the risk list has at least one test that fails when the flow breaks. Break each flow on purpose on a branch, and a test goes red.

Example:

```text
Risk list for example.com shop
1. Checkout charges the right amount       unit + integration + browser
2. Stock never goes below zero            unit + integration
3. Password reset emails the right person  integration + browser
4. Footer year updates                     none
```

**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/test-by-risk`.

- Next: [Shape the test suite like a pyramid](https://agentwranglers.se/playbook/testing/test-strategy/test-shape)
- [Test strategy](https://agentwranglers.se/playbook/testing/test-strategy)
