Test strategy — a test plan from acceptance criteria, choosing the test level (unit, integration on real infrastructure, e2e, browser), quality gates, invariant checks, concurrency, idempotency and failure tests, access isolation, contract conformance, a test report with defects. Use it when tests for a task need to be planned or written, coverage assessed or a report written (test plan, test strategy, quality gates, concurrency, idempotency, contract tests, regression).
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Test Strategy?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/vectora-os-test-strategy)
---
name: test-strategy
description: Test strategy — a test plan from acceptance criteria, choosing the test level (unit, integration on real infrastructure, e2e, browser), quality gates, invariant checks, concurrency, idempotency and failure tests, access isolation, contract conformance, a test report with defects. Use it when tests for a task need to be planned or written, coverage assessed or a report written (test plan, test strategy, quality gates, concurrency, idempotency, contract tests, regression).
metadata:
category: quality
---
# Test strategy
## Purpose
This skill turns a task's acceptance criteria into a test plan, chooses the level of each test and sets mandatory scenarios for invariants, access and external integrations. The result is tests and a test report with evidence. Product code is not changed to make a test pass: the defect goes back to the assignee.
Specific test tools are chosen by the project and recorded in an ADR or the stack description; the skill does not depend on them.
## Inputs
- Acceptance criteria, risk areas, code.
## Outputs
- Test plan (`templates/test-plan.md`), tests, test report.
## Read first
- [Project Brain](../../../project-brain/README.md) — `npm run brain -- query "test strategy"` for prior decisions, patterns and lessons.
- [AGENTS.md](../../../AGENTS.md) — [invariants](../../../AGENTS.md#invariants): every affected invariant must have a test.
- [engineering standards](../../../standards/README.md) — check commands and code rules.
- [ADR index](../../../docs/adr/README.md) — decisions on test tools and mandatory tests.
- Test plan, acceptance matrix and stack description, if the project has them (for example `docs/test-plan.md`, `docs/acceptance-matrix.md`, `docs/tech-stack.md`).
- Scenario catalog and report template — [references/test-catalog.md](references/test-catalog.md).
## Steps
1. **Source of requirements.** Write out the task's acceptance criteria and the related rows of the acceptance matrix or contract. Give every requirement an ID.
Done when every criterion has an ID and a link to a document.
2. **Test level.** For every requirement choose the cheapest level that proves it: unit (rules, calculations, validation), integration on real infrastructure (database, queue, cache: transactions, locks, idempotency, data isolation), e2e through the public interface (routes, permissions, error format, webhooks), browser (screens, accessibility).
**Rule:** concurrent access, idempotency and data isolation — only on real infrastructure, not on mocks.
Done when every requirement has a named level and test file.
3. **Invariants.** For every affected [invariant](../../../AGENTS.md#invariants) — a test that fails when it is violated. The list of invariants is not copied into the test plan — link to `AGENTS.md`.
Done when every affected invariant has a test or the entry "not affected" with a reason.
4. **Concurrency and failures.** A parallel duplicate with the same key; a repeat with the same key and a different body; a race of two operations on one resource; a failure after a write but before the transaction commits; a lock timeout and a retry; repeated and reordered incoming events; a lost response from an external system.
Done when every applicable scenario from references has a test or the entry "not applicable" with a reason.
5. **Access and data.** For every new store with user data — a test "no access context → no data". For every read route — a test with two data owners, someone else's resource → `404` (or the code the project accepted). For a sensitive command — tests for missing permissions and for bypassing confirmation, if confirmation is required.
Done when every new route and store has such tests.
6. **Contract conformance.** If there is an external contract (OpenAPI, event schema, a partner's contract), tests are named by the contract scenario ID and run against the pinned contract version. Changing a contract without a version is a blocker.
Done when every affected contract scenario has a test with the same ID in its name.
7. **Methods that need a decision.** Property-based, load and mutation tests — if the required tool is not in the accepted stack, an ADR is needed. Until then — a simple implementation without a new dependency (a generator with a fixed seed, measurements in integration tests).
Done when the need for a tool is recorded as a question for the owner, not added as a dependency.
8. **Quality gates and report.** `npm run check` is green; when documentation changed — `npm run check:docs`. The report follows the template from references; for an acceptance matrix row — the row ID, environment, build version and result.
Done when the report contains the requirements, tests, command outcome and defects with reproduction steps.
## Best practices
- Lowest test level that proves the criterion.
- Two-tenant and concurrency tests for invariants.
## Common mistakes
- Testing implementation details.
- Changing product code to pass a test.
## Example
Invitations: 11 criteria mapped to unit, integration and E2E tests incl. reused tokens and tenant isolation.
## Reusable prompt
```text
Apply the test-strategy skill (.agents/skills/test-strategy/SKILL.md).
Context: {{task card or question; links to PRD, ADRs, code paths}}
Constraints: {{approved thresholds, deadlines, allowed files}}
Map every acceptance criterion to a test level and scenario, add mandatory invariant scenarios, and report results with evidence.
Cite evidence for every claim; list open questions separately.
```
## Checks
- [ ] Every acceptance criterion has a test or the entry "not verifiable" with a reason.
- [ ] Every affected invariant from `AGENTS.md` has a test.
- [ ] Concurrency, idempotency and isolation tests run on real infrastructure.
- [ ] Contract tests are named by the contract scenario IDs.
- [ ] No real personal data, keys or tokens — synthetic data only.
- [ ] No new test dependencies without an ADR.
- [ ] `npm run check` is green; the output is attached to the report.
- [ ] Every defect found is returned to the assignee with reproduction steps; product code was not fixed to make a test pass.
## Out of scope
- Independent security review — `independent-security-review`; load measurements and profiling — `performance`.
- Implementing fixes — `task-execution` by the assignee.
- Choosing new test tools — `architecture-decisions` and the owner.