Testing Strategy
Design effective testing strategies balancing coverage, speed, and maintenance.
Testing Pyramid
/ E2E \ Few, slow, high confidence
/ Integration \ Some, medium speed
/ Unit Tests \ Many, fast, focused
Strategy by Component Type
- API endpoints: Unit tests for business logic, integration tests for HTTP layer, contract tests for consumers
- Data pipelines: Input validation, transformation correctness, idempotency tests
- Frontend: Component tests, interaction tests, visual regression, accessibility
- Infrastructure: Smoke tests, chaos engineering, load tests
What to Cover
Focus on: business-critical paths, error handling, edge cases, security boundaries, data integrity.
Skip: trivial getters/setters, framework code, one-off scripts.
Output
Produce a test plan with: what to test, test type for each area, coverage targets, and example test cases. Identify gaps in existing coverage.
1---2name: testing-strategy3description: Design test strategies and test plans. Trigger with "how should we test", "test strategy for", "write tests for", "test plan", "what tests do we need", or when the user needs help with testing approaches, coverage, or test architecture.4---5
6# Testing Strategy
7
8Design effective testing strategies balancing coverage, speed, and maintenance.
9
10## Testing Pyramid
11
12```
13 / E2E \ Few, slow, high confidence
14 / Integration \ Some, medium speed
15 / Unit Tests \ Many, fast, focused
16```
17
18## Strategy by Component Type
19
20- **API endpoints**: Unit tests for business logic, integration tests for HTTP layer, contract tests for consumers
21- **Data pipelines**: Input validation, transformation correctness, idempotency tests
22- **Frontend**: Component tests, interaction tests, visual regression, accessibility
23- **Infrastructure**: Smoke tests, chaos engineering, load tests
24
25## What to Cover
26
27Focus on: business-critical paths, error handling, edge cases, security boundaries, data integrity.
28
29Skip: trivial getters/setters, framework code, one-off scripts.
30
31## Output
32
33Produce a test plan with: what to test, test type for each area, coverage targets, and example test cases. Identify gaps in existing coverage.