test-strategy
Writes a test strategy for a product, system or team: quality goals, test levels and their share, environments, data, automation scope, non-functional testing, metrics and a roadmap. Use when the user says 'test strategy' or 'QA strategy'. Not for one sprint or release plan (use test-planning).
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- test-strategy
- license
- Apache-2.0
- description
- Writes a test strategy for a product, system or team: quality goals, test levels and their share, environments, data, automation scope, non-functional testing, metrics and a roadmap. Use when the user says 'test strategy' or 'QA strategy'. Not for one sprint or release plan (use test-planning).
- argument-hint
- [product, system or team]
03 SKILL.md 正文
test-strategy
Objective
A test strategy says how a team gets confidence in quality, and at what cost. It decides which test level owns which risk, so that each defect class has a cheap place where it is caught. The output is a short document that a team can follow and review each quarter.
Context
- Read
.agents/qa-project-context.mdif it exists. Use it, and skip the questions that it answers. - If it does not exist, find the facts in the repository and the documentation. Suggest
qa-project-contextonce. Do not stop the work for it. - If a risk matrix exists, use it. If not, do a short version of
risk-based-testingfirst.
Discovery questions
- What is the business goal for quality: fewer incidents, faster releases, a compliance need, lower test cost?
- Which failures hurt most: money, data, security, availability, user trust?
- What is the release rhythm and how long may the pipeline take?
- Which test levels exist today, and which of them catch real defects?
- Who writes and owns the tests: developers, QA engineers, both?
- Which external systems and teams are involved, and who owns their contracts?
Principles
- Each risk has an owner level. Business rules belong in fast unit and API tests. Wiring and infrastructure belong in integration tests. Agreements between teams belong in contract tests. Only a few critical journeys belong in end-to-end tests.
- Fast feedback first. A defect found in seconds costs less than one found in a nightly run.
- Evidence over coverage numbers. Measure if tests catch defects (escaped defects, mutation score, fault injection), not only which lines ran.
- Automate the repeatable, explore the unknown. Automated checks protect known behavior. Exploratory sessions find new risks.
- Non-functional needs are planned, not added late. Performance, security, accessibility and resilience have owners and criteria.
Workflow
- Current state. Describe the test levels, their size, their run time, their flakiness and the escaped defects of the last releases.
- Risks. List the top risks with their impact and likelihood.
- Level ownership. For each risk class, choose the level that catches it at the lowest cost. Write the target shape (the share of tests for each level), with a reason.
- Scope. In scope and out of scope, for each system and each quality attribute.
- Environments and data. Which environment runs which level. Which services are real or simulated. How test data is created and cleaned.
- Automation approach. Frameworks by level (use the project's own), naming and tagging, where tests live, how they run in the pipeline, who maintains them.
- Non-functional testing. Criteria and timing for performance, security, accessibility and resilience.
- Entry and exit criteria for a change, a release and a hotfix.
- Metrics. A few that change decisions: escaped defects by level, flaky test rate, pipeline time, mutation score of critical modules, time to fix a broken build.
- Roadmap. The next three steps, with an owner and a date.
Anti-patterns
- An inverted pyramid. Most checks in slow end-to-end tests. The suite becomes slow and flaky, and business rules are tested through the UI.
- Strategy as a template. A document with generic text that nobody follows. Each statement must change a decision.
- Coverage as the goal. A coverage target alone rewards tests that run code but check nothing.
- No owner. A strategy without owners and dates does not change anything.
Done when
- Each top risk has an owner level and a test approach.
- The target test shape, environments, data approach and pipeline stages are stated with reasons.
- Entry and exit criteria and three to five metrics are defined.
- The roadmap has owners and dates, and the user has reviewed the open points.
Related skills
risk-based-testing: the risk scores that drive the strategy.test-planning: applies the strategy to one sprint or release.test-coverage-map: shows the current state.ci-cd-integration: puts the levels into the pipeline.
04 同仓库更多 Skills
unit-testing
Writes, fixes or improves unit tests for rules, calculations, validation and state logic: arrange-act-assert, exact oracles, boundary sets, doubles only at boundaries, controlled clock and randomness. Use when the user says 'write unit tests', 'TDD this' or 'mock this dependency'. Not for HTTP endpoints (use api-testing).
ui-automation
Writes, fixes or structures browser end-to-end tests for critical journeys: role, label or test ID locators, auto-waiting assertions, API data setup, page objects, auth reuse and traces. Use when the user says 'UI test', 'end-to-end test' or 'our UI tests are brittle'. Not for business rules (use unit-testing).
testcase-reviewer
Reviews automated tests or manual test cases like a senior test architect: scores fidelity, oracles, assertion depth, edge cases and determinism, and finds tests that pass on wrong code. Use when the user says 'review my tests', 'test smells' or 'review AI-written tests'. Not for fault injection (use mutation-probe).
testability-review
Scores how testable a feature, module or design is before tests exist (seams for clock, randomness and network, hidden state, observability) and gives the smallest production change per blocker. Use when the user asks 'is this testable' or 'why is this hard to test'. Not for writing the tests (use unit-testing).
test-runner
Finds how a project runs its tests, runs the right subset, and triages each failure as product bug, test defect, environment problem or flaky test, with evidence. Use when the user says 'run the tests' or asks 'which tests fail and why'. Not for pipeline design (use ci-cd-integration).
test-review-panel
Reviews tests or a change with up to 8 independent read-only reviewer personas, then merges their findings into one ranked list. Use when the user says 'review panel' or 'deep test review', asks 'is this change safe to merge', or wants AI-written tests reviewed from all angles. Not for a quick score (use testcase-reviewer).