Test Strategy Document Skill
Produces a complete test strategy from a feature spec, PRD, or system description — covering scope, test types, risk areas, coverage requirements, and a prioritised test case outline.
Required Inputs
Ask for these if not provided:
- Feature or system being tested (paste a spec, PRD, or describe it in plain English)
- Tech stack (language and framework — e.g. TypeScript + React, Python + FastAPI)
- Existing test coverage (e.g. "we have unit tests but no E2E tests", "we use Jest + Playwright already", or "starting from scratch")
- Deployment cadence (e.g. continuous deployment / weekly releases / quarterly — affects what must be automated vs. manual)
- Risk level (low / medium / high / critical — affects depth and coverage requirements)
- Timeline (when does this need to ship — affects prioritisation)
- Team context (who is doing the testing — developers / dedicated QA / both)
Output Format
1. Test Scope
In scope:
- [Specific functionality being tested]
- [Integration points covered]
- [User-facing flows included]
Out of scope:
- [What is deliberately not tested here — and why]
- [Dependencies owned by other teams]
Assumptions:
- [What the test strategy assumes is true — e.g. mocked services, test data availability]
2. Risk Assessment
Identify the highest-risk areas first — these drive depth and coverage:
| Area |
Risk Level |
Why |
Test Priority |
| [e.g. Payment processing] |
High |
Money movement, regulatory |
P0 — exhaustive |
| [e.g. User authentication] |
High |
Security boundary |
P0 — exhaustive |
| [e.g. Email notifications] |
Medium |
External dependency |
P1 — happy path + key failures |
| [e.g. UI copy changes] |
Low |
Visual only, reversible |
P2 — smoke only |
3. Test Types and Coverage
Unit Tests
- What: Individual functions and methods in isolation
- Who writes: Developer
- Coverage target: [e.g. 80% line coverage on new code / 100% on critical paths]
- Tools: [e.g. Jest, pytest, go test]
- Focus areas for this feature: [Specific logic that needs unit coverage]
Integration Tests
- What: Service interactions, database operations, API contracts
- Who writes: Developer / QA
- Coverage target: [All happy paths + key failure modes]
- Tools: [e.g. Supertest, pytest + testcontainers]
- Focus areas: [Specific integrations at risk — e.g. third-party API, DB schema changes]
End-to-End Tests
- What: Critical user journeys from browser/client to database
- Who writes: QA / Developer
- Coverage target: [Top N user journeys — list them]
- Tools: [e.g. Playwright, Cypress, Selenium]
- Focus areas: [The 3–5 most critical user flows]
Performance Tests (include if any row in the Risk Assessment table has performance as a risk factor, regardless of overall risk level)
- What: Load, stress, or latency testing
- Targets: [Specific numbers — e.g. 200 req/sec at p95 < 200ms]
- Tools: [e.g. k6, Locust, JMeter]
Security Tests (include only if risk is high+)
- What: OWASP Top 10 checks relevant to this feature
- Focus: [Auth bypasses, injection, data exposure]
- Tools: [e.g. OWASP ZAP, manual penetration testing, Snyk]
4. Test Case Outline
Priority-ordered list of specific test cases:
P0 — Must pass before merge:
| Test Case |
Type |
Expected Outcome |
| [e.g. User can log in with valid credentials] |
E2E |
[Redirect to dashboard, session created] |
| [e.g. Invalid login returns 401] |
Integration |
[Error message displayed, no session] |
| [e.g. Password is never stored in plain text] |
Unit |
[bcrypt hash in DB] |
P1 — Must pass before release:
| Test Case |
Type |
Expected Outcome |
| [e.g. Login fails gracefully when DB is down] |
Integration |
[User sees friendly error, 503] |
| [e.g. Rate limiting blocks after 5 failed attempts] |
Integration |
[429 returned, account flagged] |
P2 — Should pass, can ship with known issues tracked:
| Test Case |
Type |
Expected Outcome |
| [e.g. Login page renders correctly on mobile] |
E2E |
[Layout matches design] |
5. Test Data Requirements
- [Specific test data needed — e.g. test user accounts with various states]
- [External service stubs or mocks needed]
- [Database seed data requirements]
- [Any PII concerns and how test data handles them]
6. Definition of Done
Testing is complete when:
Quality Checks
Anti-Patterns
Usage Examples
- "Write a test strategy for [feature]" + [paste spec or PRD]
- "Create a test plan for [system]"
- "How should we test [feature]?"
- "I need a QA plan for this sprint"
- "What tests do we need for [X]?"
1---2name: test-strategy-doc-23description: "Write a test strategy document from a feature spec, PRD, or system description. Use when asked to create a test plan, write a test strategy, define QA approach, or plan testing for a feature or release. Produces a complete test strategy with scope, risk assessment, test types, coverage targets, and a prioritised test case outline."4homepage: https://mohitagw15856.github.io/pm-claude-skills/skill/test-strategy-doc.html5metadata:6 source: https://skillmd.com/skills/mohitagw15856/test-strategy-doc-27 openclaw:8 emoji: ⚙️9---1011# Test Strategy Document Skill1213Produces a complete test strategy from a feature spec, PRD, or system description — covering scope, test types, risk areas, coverage requirements, and a prioritised test case outline.1415## Required Inputs1617Ask for these if not provided:18- **Feature or system being tested** (paste a spec, PRD, or describe it in plain English)19- **Tech stack** (language and framework — e.g. TypeScript + React, Python + FastAPI)20- **Existing test coverage** (e.g. "we have unit tests but no E2E tests", "we use Jest + Playwright already", or "starting from scratch")21- **Deployment cadence** (e.g. continuous deployment / weekly releases / quarterly — affects what must be automated vs. manual)22- **Risk level** (low / medium / high / critical — affects depth and coverage requirements)23- **Timeline** (when does this need to ship — affects prioritisation)24- **Team context** (who is doing the testing — developers / dedicated QA / both)2526## Output Format2728### 1. Test Scope2930**In scope:**31- [Specific functionality being tested]32- [Integration points covered]33- [User-facing flows included]3435**Out of scope:**36- [What is deliberately not tested here — and why]37- [Dependencies owned by other teams]3839**Assumptions:**40- [What the test strategy assumes is true — e.g. mocked services, test data availability]4142### 2. Risk Assessment4344Identify the highest-risk areas first — these drive depth and coverage:4546| Area | Risk Level | Why | Test Priority |47|---|---|---|---|48| [e.g. Payment processing] | High | Money movement, regulatory | P0 — exhaustive |49| [e.g. User authentication] | High | Security boundary | P0 — exhaustive |50| [e.g. Email notifications] | Medium | External dependency | P1 — happy path + key failures |51| [e.g. UI copy changes] | Low | Visual only, reversible | P2 — smoke only |5253### 3. Test Types and Coverage5455**Unit Tests**56- **What:** Individual functions and methods in isolation57- **Who writes:** Developer58- **Coverage target:** [e.g. 80% line coverage on new code / 100% on critical paths]59- **Tools:** [e.g. Jest, pytest, go test]60- **Focus areas for this feature:** [Specific logic that needs unit coverage]6162**Integration Tests**63- **What:** Service interactions, database operations, API contracts64- **Who writes:** Developer / QA65- **Coverage target:** [All happy paths + key failure modes]66- **Tools:** [e.g. Supertest, pytest + testcontainers]67- **Focus areas:** [Specific integrations at risk — e.g. third-party API, DB schema changes]6869**End-to-End Tests**70- **What:** Critical user journeys from browser/client to database71- **Who writes:** QA / Developer72- **Coverage target:** [Top N user journeys — list them]73- **Tools:** [e.g. Playwright, Cypress, Selenium]74- **Focus areas:** [The 3–5 most critical user flows]7576**Performance Tests** *(include if any row in the Risk Assessment table has performance as a risk factor, regardless of overall risk level)*77- **What:** Load, stress, or latency testing78- **Targets:** [Specific numbers — e.g. 200 req/sec at p95 < 200ms]79- **Tools:** [e.g. k6, Locust, JMeter]8081**Security Tests** *(include only if risk is high+)*82- **What:** OWASP Top 10 checks relevant to this feature83- **Focus:** [Auth bypasses, injection, data exposure]84- **Tools:** [e.g. OWASP ZAP, manual penetration testing, Snyk]8586### 4. Test Case Outline8788Priority-ordered list of specific test cases:8990**P0 — Must pass before merge:**91| Test Case | Type | Expected Outcome |92|---|---|---|93| [e.g. User can log in with valid credentials] | E2E | [Redirect to dashboard, session created] |94| [e.g. Invalid login returns 401] | Integration | [Error message displayed, no session] |95| [e.g. Password is never stored in plain text] | Unit | [bcrypt hash in DB] |9697**P1 — Must pass before release:**98| Test Case | Type | Expected Outcome |99|---|---|---|100| [e.g. Login fails gracefully when DB is down] | Integration | [User sees friendly error, 503] |101| [e.g. Rate limiting blocks after 5 failed attempts] | Integration | [429 returned, account flagged] |102103**P2 — Should pass, can ship with known issues tracked:**104| Test Case | Type | Expected Outcome |105|---|---|---|106| [e.g. Login page renders correctly on mobile] | E2E | [Layout matches design] |107108### 5. Test Data Requirements109- [Specific test data needed — e.g. test user accounts with various states]110- [External service stubs or mocks needed]111- [Database seed data requirements]112- [Any PII concerns and how test data handles them]113114### 6. Definition of Done115Testing is complete when:116- [ ] All P0 test cases pass117- [ ] All P1 test cases pass118- [ ] Code coverage meets the stated target119- [ ] No critical or high severity bugs open120- [ ] Performance targets met (if applicable)121- [ ] Security checks completed (if applicable)122123## Quality Checks124- [ ] Risk table is populated and drives test priority (not filled in generically)125- [ ] Every "P0 — exhaustive" row in the Risk Assessment table has at least one corresponding P0 test case126- [ ] "Out of scope" section names at least one explicit exclusion (not left blank)127- [ ] Each test type names a concrete tool (not "some testing framework")128- [ ] Definition of Done is measurable (not "tests are done when QA is happy")129130## Anti-Patterns131132- [ ] Do not write a test strategy without a risk table that drives test priority — generic coverage targets are not a strategy133- [ ] Do not leave the "out of scope" section blank — every test strategy must explicitly name what is not being tested and why134- [ ] Do not specify test types without naming a concrete tool for each — "some testing framework" is not actionable135- [ ] Do not define a Definition of Done that is not measurable — "QA is happy" is not a completion criterion136- [ ] Do not create P0 risk areas without corresponding P0 test cases — risk rating must map to test coverage137138## Usage Examples139- "Write a test strategy for [feature]" + [paste spec or PRD]140- "Create a test plan for [system]"141- "How should we test [feature]?"142- "I need a QA plan for this sprint"143- "What tests do we need for [X]?"