Test Plan Writing
Create practical, risk-based test plans.
Right-Size the Plan
Small feature: One-page plan (scope, risks, approach). Large feature: Full plan with all sections. Ask "Does the reader need this?" for every section.
Risk-Based Prioritization
| Risk/Impact |
High Impact |
Low Impact |
| High Risk |
Test thoroughly |
Test defensively |
| Low Risk |
Test key paths |
Minimal testing |
Test Pyramid
/ E2E \ Few, slow, expensive
/ Integ. \ Some, moderate
/ Unit \ Many, fast, cheap
Required Sections
Overview - Feature under test, objectives, link to spec
Scope - In scope (what tested), Out of scope (what not, and why)
Test Strategy - Test types, approach per component, automation decisions
Risk Assessment - Identified risks, severity, mitigation, attention areas
Test Cases - Organized by feature, priority (P0/P1/P2), happy path and edge cases
Environment & Data - Test environments, data requirements, dependencies
Entry/Exit Criteria - When testing starts, when testing is complete
Test Case Format
### TC-001: [Description]
**Priority**: P0 | P1 | P2
**Type**: Unit | Integration | E2E | Manual
**Preconditions**:
- [Required state]
**Steps**:
1. [Action]
**Expected Result**:
- [Outcome]
**Edge Cases**:
- [Variations]
Priority Definitions
| Priority |
Description |
Coverage |
| P0 |
Critical path, must work |
100% automated |
| P1 |
Important functionality |
Mostly automated |
| P2 |
Edge cases |
Manual or deferred |
Test Types
| Type |
Purpose |
When |
| Unit |
Isolated functions |
Business logic, utilities |
| Integration |
Component interactions |
APIs, database, services |
| E2E |
Complete user flows |
Critical journeys |
| Manual |
Exploratory, UX |
Complex UI, accessibility |
Guidelines
Link tests to requirements. Prefer automation. Test behavior, not implementation. Keep tests simple.
Anti-Patterns
Do not test implementation details. Do not target 100% coverage as a goal. Do not create flaky tests. Do not rely on specific timing or order. Do not mock everything.
Template
Use templates/test-plan.md for new plans.
1---2name: writing-test-plans3description: Creates risk-based test plans and strategies. Use when planning testing, defining test scope, or documenting QA approach.4---5
6# Test Plan Writing
7
8Create practical, risk-based test plans.
9
10## Right-Size the Plan
11
12Small feature: One-page plan (scope, risks, approach). Large feature: Full plan with all sections. Ask "Does the reader need this?" for every section.
13
14## Risk-Based Prioritization
15
16| Risk/Impact | High Impact | Low Impact |
17|-------------|-------------|------------|
18| High Risk | Test thoroughly | Test defensively |
19| Low Risk | Test key paths | Minimal testing |
20
21## Test Pyramid
22
23```
24 / E2E \ Few, slow, expensive
25 / Integ. \ Some, moderate
26 / Unit \ Many, fast, cheap
27```
28
29## Required Sections
30
311. **Overview** - Feature under test, objectives, link to spec
32
332. **Scope** - In scope (what tested), Out of scope (what not, and why)
34
353. **Test Strategy** - Test types, approach per component, automation decisions
36
374. **Risk Assessment** - Identified risks, severity, mitigation, attention areas
38
395. **Test Cases** - Organized by feature, priority (P0/P1/P2), happy path and edge cases
40
416. **Environment & Data** - Test environments, data requirements, dependencies
42
437. **Entry/Exit Criteria** - When testing starts, when testing is complete
44
45## Test Case Format
46
47```markdown
48### TC-001: [Description]
49
50**Priority**: P0 | P1 | P2
51**Type**: Unit | Integration | E2E | Manual
52
53**Preconditions**:
54- [Required state]
55
56**Steps**:
571. [Action]
58
59**Expected Result**:
60- [Outcome]
61
62**Edge Cases**:
63- [Variations]
64```
65
66## Priority Definitions
67
68| Priority | Description | Coverage |
69|----------|-------------|----------|
70| P0 | Critical path, must work | 100% automated |
71| P1 | Important functionality | Mostly automated |
72| P2 | Edge cases | Manual or deferred |
73
74## Test Types
75
76| Type | Purpose | When |
77|------|---------|------|
78| Unit | Isolated functions | Business logic, utilities |
79| Integration | Component interactions | APIs, database, services |
80| E2E | Complete user flows | Critical journeys |
81| Manual | Exploratory, UX | Complex UI, accessibility |
82
83## Guidelines
84
85Link tests to requirements. Prefer automation. Test behavior, not implementation. Keep tests simple.
86
87## Anti-Patterns
88
89Do not test implementation details. Do not target 100% coverage as a goal. Do not create flaky tests. Do not rely on specific timing or order. Do not mock everything.
90
91## Template
92
93Use `templates/test-plan.md` for new plans.