writing-test-plans
Creates risk-based test plans and strategies. Use when planning testing, defining test scope, or documenting QA approach.
When & Why to Use This Skill
This Claude skill streamlines the software quality assurance process by generating comprehensive, risk-based test plans and strategies. It helps development teams define clear test scopes, prioritize testing efforts based on impact, and document structured test cases across the entire test pyramid—from unit tests to E2E flows—ensuring high-quality software delivery and efficient resource allocation.
Use Cases
- New Feature Planning: Automatically generate a structured test plan for a new feature, covering objectives, in-scope/out-of-scope items, and specific testing approaches.
- Risk-Based Resource Allocation: Use the risk/impact matrix to identify critical paths that require 100% automation versus low-risk areas suitable for manual or minimal testing.
- QA Strategy Standardization: Establish a consistent testing framework across a team by defining standardized priority levels (P0-P2) and test case formats (TC-001).
- Test Pyramid Optimization: Design a balanced testing strategy that correctly distributes efforts between fast unit tests, component integrations, and end-to-end user journeys.
- Documentation for Stakeholders: Create professional QA approach documents that outline entry/exit criteria and environment requirements for project sign-offs.
| name | writing-test-plans |
|---|---|
| description | Creates risk-based test plans and strategies. Use when planning testing, defining test scope, or documenting QA approach. |
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.