Skip to content
Skills Library
Programming · Planning

testspec-plan

/testspec-plan

TestSpec 测试策略规划阶段。为多环境、多 runner、跨组件、非功能测试、真实执行或大型测试拆分设计最少且证据充分的测试 seam、oracle、环境与 capability matrix、证据策略和准入退出条件,产出当前 change 的 strategy.md。用户明确要求测试策略、怎么证明、测试层级或执行证据方案时使用。分析需求风险使用 testspec-analysis;列测试点使用 testspec-points;生成具体步骤和预期结果使用 testspec-generate。

Repository
testkit ↗
Licence
MIT
Last repository change
28.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
3
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 28.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

TestSpec 测试策略规划阶段。为多环境、多 runner、跨组件、非功能测试、真实执行或大型测试拆分设计最少且证据充分的测试 seam、oracle、环境与 capability matrix、证据策略和准入退出条件,产出当前 change 的 strategy.md。用户明确要求测试策略、怎么证明、测试层级或执行证据方案时使用。分析需求风险使用 testspec-analysis;列测试点使用 testspec-points;生成具体步骤和预期结果使用 testspec-generate。

Original author description

TestSpec 测试策略规划阶段。为多环境、多 runner、跨组件、非功能测试、真实执行或大型测试拆分设计最少且证据充分的测试 seam、oracle、环境与 capability matrix、证据策略和准入退出条件,产出当前 change 的 strategy.md。用户明确要求测试策略、怎么证明、测试层级或执行证据方案时使用。分析需求风险使用 testspec-analysis;列测试点使用 testspec-points;生成具体步骤和预期结果使用 testspec-generate。

How it works

  1. 职责
  2. 何时必需
  3. 共享规则源
  4. 执行步骤
  5. 必需内容
  6. 禁止事项
  7. 交付前检查
Original SKILL.md headings · 104 lines, 308 words
SKILL.md preview
---
name: testspec-plan
license: MIT
description: TestSpec 测试策略规划阶段。为多环境、多 runner、跨组件、非功能测试、真实执行或大型测试拆分设计最少且证据充分的测试 seam、oracle、环境与 capability matrix、证据策略和准入退出条件,产出当前 change 的 strategy.md。用户明确要求测试策略、怎么证明、测试层级或执行证据方案时使用。分析需求风险使用 testspec-analysis;列测试点使用 testspec-points;生成具体步骤和预期结果使用 testspec-generate。
---

# testspec-plan:测试策略

铁律:strategy 只定义“如何证明”,不得新增产品行为、验收规则或实现要求;满足证据充分性的最少 seams 优先。

```text
TestSpec 策略进度:

- [ ] 步骤 1:定位 change 并读取当前 requirements-analysis.md ⚠️ 必需
- [ ] 步骤 2:校验 context schema、revision 和 plan blocker ⚠️ 必需
- [ ] 步骤 3:设计最少充分 seams、oracle、环境、能力和证据
- [ ] 步骤 4:写入 strategy.md 和完整 v2 context
- [ ] 步骤 5:验证产物并报告下一步
```

## 职责

输入当前 revision 的 canonical requirements 与 `requirements-analysis.md`,产出:

```text
testspec/changes/<name>/strategy.md
```

边界固定为:

- requirements:产品做什么、如何验收
- analysis:为什么存在风险和缺口
- strategy:如何取得足够证据
- points:要验证什么
- cases:具体步骤、数据和预期结果

## 何时必需

`strategy_requirement.status = required` 时不能跳过本阶段。以下任一信号应由 new/update/analysis 标记 required:

- 多环境或多 runner
- 跨组件或跨服务
- 非功能测试
- 真实执行或外部依赖验证
- 大型测试拆分
- 需要多个互补 oracle 或证据面
- 存在 capability、fallback 或 inconclusive 决策

简单、单环境、纯用例设计可以标记 skipped。用户明确要求测试策略时,即使上游判定可跳过,也可以生成 optional strategy;不得借此改变产品口径。

## 共享规则源

- context 与阶段传播:`../_testspec-shared/references/context-protocol.md`
- 质询与 blocker:`../_testspec-shared/references/interrogation-protocol.md`
- 输出契约:`../_testspec-shared/references/output-contracts.md`
- strategy 模板:`references/strategy-template.md`
- 来源权威与信任:`../_testspec-shared/references/source-provenance.md`

## 执行步骤

1. 按共享 current-change 规则定位唯一 change。
2. 读取 `requirements.md`(否则 proposal)与 `requirements-analysis.md`。analysis 缺失、revision 不同或 context 不是 v2 时停止。
3. 运行:

   ```bash
   python "<_testspec-shared>/scripts/validate_question_graph.py" \
     --input <change>/requirements-analysis.md \
     --target-stage plan
   ```

   blocker、隐藏 blocker、循环或非法 resolution 存在时不写 strategy。
4. 加载 `references/strategy-template.md`,只记录会改变后续测试选择或 verdict 的内容。
5. 为每条 REQ、RISK 和相关 Q-ID选择证据。优先复用已有 seam;一个 seam 能充分证明时不重复,多个 seam 分别证明不同事实时全部保留。
6. 对每个 oracle 标明来源、可观察值和不可判定条件。reference 代码、历史用例和 recommendation 不能单独成为产品 oracle。
7. 写 `strategy.md`,原样传播 `source_revision`、`questions`、`strategy_requirement` 和来源字段;从 stale 列表移除 `strategy.md`,其余顺序保持不变,下一步指向 `testspec-points`。
8. 运行 context chain validator `--through plan`,通过后再报告完成。

## 必需内容

- scope / out-of-scope
- fewest sufficient test seams
- oracle catalog
- environment matrix
- capability matrix
- evidence strategy
- coverage tiers
- entry / exit criteria
- fallback / inconclusive conditions
- canonical revision envelope
- REQ / RISK / Q 追溯

## 禁止事项

- 不把“理想只有一个 seam”当硬目标。
- 不重新采访已由 requirements 决定的产品行为。
- 不把 recommendation、代码现状或历史用例直接晋升为需求。
- 不写具体测试步骤、账号、数据值或逐条 expected result。
- 不访问真实环境或执行测试。
- 不在 blocker 未清零时生成看似完整的 strategy。

## 交付前检查

- [ ] strategy 只回答如何证明,没有新产品规则。
- [ ] 每个 seam 都对应独立证据价值。
- [ ] oracle 均有权威来源和 inconclusive 条件。
- [ ] 环境与 capability 缺口有 fallback,不伪造可执行性。
- [ ] REQ、RISK、Q 追溯完整。
- [ ] v2 context、revision、questions 和 stale 链验证通过。
Files in this package (3)
  • SKILL.md 5 KB
  • evals/evals.json 6 KB
  • references/strategy-template.md 2 KB

Versions

The database has no other skills named testspec-plan.

Database snapshot: 13.11.2026 · package version f14c999c5f95 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100testspec-points
    支持根据 Review 反馈定向返修TP_ID。TestSpec 测试点(流程第 3 步)- 从需求分析中提炼「要测什么」的简短要点清单,产出 specs/testpoints.md。当用户要「写测试点」「提取测试要点」「列出要验证的内容」或执行 testspec-points / testspec points 时使用。也适用于用户说「这个功能要测哪些点」「帮我列测试清单」的场景。与测试用例区分:测试点只列验证目标(What),不写操作步骤(How)。产出供 testspec-generate 展开为完整测试用例。
  • 100testspec-review
    TestSpec 用例评审(流程第 5 步)- 对生成的测试用例做 14 维度交叉验证(R1-R6 规则检查 + H1-H8 启发式检查),产出 review-report.md 评审报告。当用户要「评审用例」「检查用例质量」「审查测试用例」或执行 testspec-review / testspec review 时使用。也适用于用户说「用例写完了帮我看看」「检查一下覆盖度」「用例有没有问题」的场景。支持默认模式和 --deep 深度模式。
  • 100test-strategy-reviewer
    Review test strategy, 测试策略评审。Use when: 测试策略写完后,需要审查风险覆盖、独立测试分层、阶段化执行规则、环境策略与入口/出口标准是否成立。
  • 96s05-01-test-plan
    制定测试策略、范围、环境、进度与准入准出标准。当用户要求'写测试方案/测试计划'时使用。产出测试方案 docx。只读代码,不修改源码。
  • 90risk-based-test-plan
    Build a lean, risk-based test plan for a feature, epic or release: scope, risk matrix (impact x likelihood), test approach per risk, test types, data, environments, entry and exit criteria. Use when a feature needs a plan, before a release, or when asked what to test first with limited time.
  • 10001-test-strategy
    Use when producing or updating project test strategy for risk-based test levels, test types, environments, tooling, entry criteria, and exit criteria. Use test-plan for the neighbouring concern; this skill owns the named document contract and its acceptance evidence.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.