Test strategy Required
Test what would hurt to break
Put the most tests where a bug would cost money, data or trust. Code that cannot break silently needs few tests.
How to do it
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.
Example
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
How to 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.
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.