Test strategy designer
agent-skills
npx -y skills add bingooyong/agent-skills --skill test-strategy-designerAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Analyze code changes and design targeted test strategies covering impact scope, test types, and priority. Use when (1) determining what tests are needed after code changes, (2) designing test plans for new features or bug fixes, (3) estimating test effort and coverage gaps, (4) selecting appropriate test types. Outputs actionable test strategies with priority and scope.
SKILL.md
5.4 KB, ~2.0k tokens by cl100k_base, as published. Nobody here has run it
测试策略设计 Skill
根据代码变更分析测试影响面,设计按优先级分类的测试策略,帮助选择合适的测试类型和范围。
何时使用
- 代码变更后确定需要测什么
- 新功能开发前设计测试计划
- 评估测试覆盖率缺口
- 选择合适的测试类型(单元/集成/E2E/性能)
不适用:编写具体测试代码、CI/CD 流水线配置、测试环境搭建。
测试类型选择矩阵
| 变更类型 | 单元测试 | 集成测试 | E2E 测试 | 性能测试 | 安全测试 |
|---|---|---|---|---|---|
| 纯逻辑/数据转换 | 必须 | 可选 | 不需要 | 不需要 | 不需要 |
| 接口变更 | 必须 | 必须 | 建议 | 按需 | 按需 |
| UI 变更 | 不需要 | 可选 | 必须 | 不需要 | 不需要 |
| 性能敏感路径 | 必须 | 必须 | 不需要 | 必须 | 不需要 |
| 安全相关 | 必须 | 必须 | 按需 | 不需要 | 必须 |
| 并发/异步逻辑 | 必须 | 必须 | 建议 | 建议 | 不需要 |
输入
| 输入类型 | 说明 | 必需 |
|---|---|---|
| 代码变更内容 | diff 或变更描述 | 是 |
| 变更涉及的模块 | 受影响的模块名称 | 是 |
| 已有测试覆盖率 | 当前覆盖率数据和已有测试 | 否 |
| 项目技术栈 | 语言、框架、测试框架 | 否 |
| 质量要求级别 | 基础 / 标准 / 严格 | 否(默认标准) |
输出
- 测试影响面分析
- 按优先级分类的测试策略(P0/P1/P2)
- 每项测试的范围、类型和理由
- 覆盖率缺口分析
- 预估测试工作量
执行步骤
1. 分析变更影响面
分析变更影响面:
IF 修改了公共 API/接口 → 影响面: 全部消费方, 优先级: P0
IF 修改了内部工具函数 → 影响面: 直接调用方, 优先级: P1
IF 修改了配置/常量 → 影响面: 所有引用点, 优先级: P1
IF 修改了 UI 组件 → 影响面: 渲染路径, 优先级: P2
IF 修改了测试代码本身 → 影响面: 测试套件, 优先级: P2
IF 新增了功能 → 影响面: 新功能路径 + 边界条件, 优先级: P0
IF 修复了 bug → 影响面: bug 路径 + 回归范围, 优先级: P0
2. 映射测试类型
根据变更类型和影响面,查测试类型选择矩阵确定需要的测试类型:
IF 变更涉及纯逻辑 → 单元测试(必须)
IF 变更涉及外部依赖交互 → 集成测试(必须)
IF 变更涉及用户可见行为 → E2E 测试(必须)
IF 变更涉及高并发/大数据 → 性能测试(建议)
IF 变更涉及认证/授权/数据处理 → 安全测试(建议)
3. 评估已有测试覆盖
覆盖率评估:
FOR each 变更路径:
IF 已有测试覆盖此路径 → 标记"已有覆盖", 评估是否需要更新
IF 已有测试但断言不充分 → 标记"覆盖不足", 建议增强
IF 无任何测试覆盖 → 标记"未覆盖", 建议新增
覆盖率缺口 = 所有"未覆盖" + "覆盖不足"的路径
4. 设计测试策略
## 测试策略
### P0 — 必须测试(阻塞发布)
| 测试项 | 测试类型 | 范围 | 理由 |
|--------|----------|------|------|
| 用户创建接口返回格式 | 单元 + 集成 | POST /users | 公共 API 变更 |
| 新增字段的空值处理 | 单元 | UserService.create | 新增必填参数 |
| 回归: 用户列表分页 | 集成 | GET /users?page= | 修改了分页逻辑 |
### P1 — 应该测试(发布前完成)
| 测试项 | 测试类型 | 范围 | 理由 |
|--------|----------|------|------|
| 错误响应格式一致性 | 集成 | 所有错误码 | 修改了错误处理 |
### P2 — 建议测试(下个迭代补充)
| 测试项 | 测试类型 | 范围 | 理由 |
|--------|----------|------|------|
| 并发创建用户 | 性能 | POST /users | 新增了唯一性校验 |
### 覆盖率缺口
- src/services/UserService.ts: 当前覆盖率 45%, 建议达到 80%
- 新增代码路径未覆盖: 错误码映射逻辑、空值分支
5. 预估工作量
工作量估算:
单元测试: 每个测试项 ~15 分钟
集成测试: 每个测试项 ~30 分钟
E2E 测试: 每个测试项 ~45 分钟
性能测试: 每个测试项 ~1 小时
安全测试: 每个测试项 ~1 小时
总计: P0 约 X 小时, P1 约 Y 小时, 全部约 Z 小时
边界与非目标
- 不做编写具体测试代码 — 只设计策略,编写由用户执行
- 不做代码 review — 这是 code-review-checklist 的职责
- 不做重构建议 — 这是 refactoring-planner 的职责
- 不做API 设计审查 — 这是 api-design-reviewer 的职责
- 不做错误模式管理 — 这是 error-pattern-library 的职责
- 只设计测试策略,不涉及 CI/CD 流水线和测试环境
验收标准
- 每个测试项都有明确的测试类型、范围和理由
- P0 测试项覆盖了所有公共 API 变更和 bug 修复路径
- 覆盖率缺口分析指出了具体的未覆盖路径
- 工作量估算基于测试类型和测试项数量
- 没有将低优先级探索性测试标记为 P0
Gives 0 of the 12 instructions most design frontend skills give in ~2.0k tokens
Counted across 1,170 of the 1,878 authors here whose files we hold, read 2026-08-06
- use css variables for color consistencyin 73 of 1170, across 24 files
- match implementation complexity to the aesthetic visionin 70 of 1170, across 20 files
- commit to one bold aesthetic direction before codingin 70 of 1170, across 25 files
- add atmospheric background effects and texturesin 58 of 1170, across 10 files
- use unexpected spatial compositions and layoutsin 55 of 1170, across 7 files
- implement real working codein 55 of 1170, across 7 files
- vary themes and aesthetics across different designsin 48 of 1170, across 7 files
- launch chromium in headless modein 47 of 1170, across 4 files
- close the browser when donein 47 of 1170, across 4 files
- run provided scripts with help flag firstin 47 of 1170, across 4 files
- use descriptive selectors for elementsin 47 of 1170, across 4 files
- wait for network idle statein 46 of 1170, across 3 files
Said here and by no other author read
- analyze impact of code changes
- map test types based on change category
- assess existing test coverage gaps
- design prioritized test strategy
- estimate test effort by type
- include type scope and reason per item
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.