Designing Test Strategies
Core principle
Design tests around the failures that matter, then choose the smallest test scope that can provide trustworthy evidence. Coverage percentage is a diagnostic signal, not a testing strategy.
Strategy workflow
- Define the product behaviors and contracts that must remain true. Include critical user journeys, data integrity, authorization, failure recovery, and externally visible interfaces.
- Rank risks by impact and likelihood. Give the most expensive or dangerous failures the strongest independent evidence.
- Choose the lowest useful layer for each risk:
- small/unit tests for deterministic logic and edge cases;
- integration tests for serialization, persistence, process boundaries, and external dependencies;
- end-to-end tests for a small set of critical user journeys that require the assembled product.
- Add non-functional verification only where the requirement exists: accessibility, performance, load, reliability, security, compatibility, or recovery.
- Define the environment and test data needed for repeatability. Tests that depend on shared mutable state, execution order, or uncontrolled production services are weak evidence.
- Decide which gates block a change or release. A gate should have an owner, a deterministic command, and a clear failure interpretation.
- Review the portfolio for redundancy. Keep a higher-level test when it proves something a narrower test cannot.
Evidence matrix
For each important risk, record:
- behavior or contract at risk;
- failure impact;
- test layer;
- environment/dependencies;
- expected evidence;
- execution cadence;
- owner when the gate fails.
Quality checks
A strategy is weak when it:
- treats a coverage target as the primary objective;
- duplicates the same assertion across every layer;
- puts most confidence in broad UI tests;
- omits integration boundaries because unit tests are fast;
- has no explicit critical user journeys;
- cannot explain what a failed gate means.
Verification
Before accepting the strategy, pick one critical behavior and one high-risk failure mode. Confirm that each has a test at the narrowest layer that can prove it, plus broader evidence only when assembly or user workflow adds unique confidence.
References
1---2name: designing-test-strategies3description: Use when a feature, service, or release needs a deliberate verification plan and the team is unsure which risks belong in unit, integration, end-to-end, or non-functional tests.4---56# Designing Test Strategies78## Core principle9Design tests around the failures that matter, then choose the smallest test scope that can provide trustworthy evidence. Coverage percentage is a diagnostic signal, not a testing strategy.1011## Strategy workflow121. Define the product behaviors and contracts that must remain true. Include critical user journeys, data integrity, authorization, failure recovery, and externally visible interfaces.132. Rank risks by impact and likelihood. Give the most expensive or dangerous failures the strongest independent evidence.143. Choose the lowest useful layer for each risk:15 - small/unit tests for deterministic logic and edge cases;16 - integration tests for serialization, persistence, process boundaries, and external dependencies;17 - end-to-end tests for a small set of critical user journeys that require the assembled product.184. Add non-functional verification only where the requirement exists: accessibility, performance, load, reliability, security, compatibility, or recovery.195. Define the environment and test data needed for repeatability. Tests that depend on shared mutable state, execution order, or uncontrolled production services are weak evidence.206. Decide which gates block a change or release. A gate should have an owner, a deterministic command, and a clear failure interpretation.217. Review the portfolio for redundancy. Keep a higher-level test when it proves something a narrower test cannot.2223## Evidence matrix24For each important risk, record:25- behavior or contract at risk;26- failure impact;27- test layer;28- environment/dependencies;29- expected evidence;30- execution cadence;31- owner when the gate fails.3233## Quality checks34A strategy is weak when it:35- treats a coverage target as the primary objective;36- duplicates the same assertion across every layer;37- puts most confidence in broad UI tests;38- omits integration boundaries because unit tests are fast;39- has no explicit critical user journeys;40- cannot explain what a failed gate means.4142## Verification43Before accepting the strategy, pick one critical behavior and one high-risk failure mode. Confirm that each has a test at the narrowest layer that can prove it, plus broader evidence only when assembly or user workflow adds unique confidence.4445## References46- Google Testing Blog, How Much Testing is Enough?: https://testing.googleblog.com/2021/06/how-much-testing-is-enough.html47- Microsoft Azure Well-Architected Framework, testing strategies: https://learn.microsoft.com/en-us/azure/well-architected/operational-excellence/testing48- Martin Fowler, Test Pyramid: https://martinfowler.com/bliki/TestPyramid.html