Purpose
A test plan answers "what, how and how much we test" for a feature or release. Goal: agree on scope, approach and done-criteria BEFORE testing, so you don't test "everything forever" or miss the important. A doc for a big release; a short checklist for a feature.
Template
# Test plan: <feature/release>
## Scope — in / out (and why). ## Approach & levels — unit/integration/e2e/manual; types.
## Environment & data. ## Test-case matrix — happy + edges + errors.
## Risks. ## Entry/Exit criteria — e.g. 0 open P1, regression green, key scenarios passed.
Example 1 — release
# Test plan: release 2.4 (cloud sync)
## Scope — in: login, cross-device core sync, conflict resolution, offline→online. Out: load >10k (separate), billing (unchanged).
## Levels — unit: merge logic; integration: sync API + DB; e2e: edit on A → appears on B; manual: offline, browsers. Types: functional + regression + security (account isolation).
## Risks — data loss/overwrite on conflict (focus); cross-account leak.
## Exit — 0 open P1/P2 · core regression green · "conflict without data loss" passed on 2 devices · browser pass.
Example 2 — feature (short)
# Test plan: auto-clip videos into Shorts
## Scope — in: upload, 9:16 clipping, subtitles, duration limits. Out: speech-recognition quality (3rd party).
## Levels — unit: clip boundaries; e2e: upload → clip → ≥3 clips; manual: durations/formats.
## Matrix — happy (12 min) · edge (40s → hint) · error (service down → retry, source intact).
## Risks — crash on long videos; source loss on error. ## Exit — all 3 green · no P1 · browser pass.
Quality checklist
- Scope explicit — in AND out.
- Levels stated (unit/e2e/manual) without dupes or gaps.
- Edges & errors covered.
- Risks named, effort focused.
- Measurable exit criteria.
Common mistakes
No "out of scope"; "test everything"; happy path only; "exit when tired"; a plan for the plan's sake.