Stats
Actions
Tags
From dev-toolkits
Guides standalone test engineering tasks: test case generation, execution, and reporting. Activated for dedicated test suite creation, full test runs, or coverage analysis.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dev-toolkits:testThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
```
┌─────────────────────────────────────────────────────────────────────────────┐
│ Step 1: 分析被测代码 │
│ ├─ 动作:分析模块类型、公开接口、输入输出、依赖关系 │
│ ├─ 产出:测试点清单 │
│ └─ 参考:references/test_rules.md → "测试点识别规则" │
├─────────────────────────────────────────────────────────────────────────────┤
│ Step 2: 设计测试用例 │
│ ├─ 动作:确定测试用例、边界条件、Mock 策略 │
│ ├─ 产出:测试用例设计 │
│ └─ 参考:references/test_rules.md → "断言规则"、"Mock 规则" │
├─────────────────────────────────────────────────────────────────────────────┤
│ Step 3: 编写测试代码 │
│ ├─ 动作:按规范编写测试、fixtures、数据准备 │
│ ├─ 产出:测试文件 │
│ └─ 参考:references/test_rules.md → "测试代码规范" │
├─────────────────────────────────────────────────────────────────────────────┤
│ Step 4: 执行测试 │
│ ├─ 动作:分层执行(Unit → Integration → E2E)、失败分类 │
│ ├─ 产出:测试结果 │
│ └─ 参考:references/test_rules.md → "失败分类规则" │
├─────────────────────────────────────────────────────────────────────────────┤
│ Step 5: 生成报告 │
│ ├─ 动作:按模板生成报告、分级呈现 │
│ ├─ 产出:测试报告 │
│ └─ 参考:references/test_rules.md → "报告规则" │
└─────────────────────────────────────────────────────────────────────────────┘
测试点清单:
├─ [P0] 核心业务逻辑:xxx
├─ [P1] 边界条件:xxx
├─ [P2] 异常处理:xxx
└─ [P3] 次要路径:xxx
→ 读取 references/test_rules.md 的 "测试点识别规则"
测试用例设计:
├─ test_case_1
│ ├─ 输入:xxx
│ ├─ 预期输出:xxx
│ ├─ 断言:assert xxx
│ └─ Mock:xxx
├─ test_case_2
│ └─ ...
→ 读取 references/test_rules.md 的:
tests/{category}/test_{module}.py 结构)@pytest.mark.unit 等)tests/unit/test_xxx.py→ 读取 references/test_rules.md 的 "测试代码规范"
pytest -m unitpytest -m integrationpytest -m e2e测试结果:
├─ 通过:N
├─ 失败:M
│ ├─ 代码 Bug:x(需用户关注)
│ ├─ 测试问题:y(已自动修复)
│ └─ 环境问题:z(已修复)
└─ 错误:k
→ 读取 references/test_rules.md 的 "失败分类规则"
测试报告:
├─ 概览:总数/通过/失败/通过率
├─ 失败分类统计
├─ 需要关注的 Bug 列表
└─ 自动修复的问题列表
→ 读取 references/test_rules.md 的 "报告规则"
| 规则 | 位置 | 用途 |
|---|---|---|
| 测试点识别规则 | references/test_rules.md | 确定测什么 |
| 断言规则 | references/test_rules.md | 怎么断言 |
| Mock 规则 | references/test_rules.md | 何时 Mock |
| 边界条件规则 | references/test_rules.md | 边界测试点 |
| 测试代码规范 | references/test_rules.md | 代码怎么写 |
| 失败分类规则 | references/test_rules.md | 失败怎么分 |
| 报告规则 | references/test_rules.md | 报告怎么写 |
npx claudepluginhub ayanjiushishuai/dev_toolkitsGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.