
test-case-writing
Use this skill when you need to create high-quality test cases with normal, exception, and boundary scenarios; triggers include 测试用例编写 and test case writing.
- Installs
- 482
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/naodeng/awesome-qa-skills --skill test-case-writing- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads test-case-writing automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
测试用例编写(中文版)
英文版: 见对应英文技能。
何时使用
- 需要在真实项目里处理 test case writing 相关任务。
- 需要一份可以直接用于执行、评审或跟进的结果。
- 需要把多个角色提供的场景候选合并成一套可追溯、无角色重复的测试用例。
执行流程
- 阅读并遵循「按需加载」中的主提示词(覆盖清单、输出结构、质量要求)。
- 只补充真正影响结果的项目上下文:范围、环境、限制、风险、依赖、期望产出,以及可选的带
source_role角色场景候选。 - 先按需求追踪、触发条件、动作与可观察预期识别等价候选,再生成一套统一用例。
- 信息不全时先给可用初版,并显式标出假设与信息缺口。
- 默认 Markdown;用户指定其他格式时再切换。
核心约束
- 按风险/业务影响排优先级,不要平均摊铺。
- 把「已确认事实」和「当前假设」分开写。
- 不要编造用户未提供的接口、字段、环境或根因细节。
- 结果必须可执行:场景具体、有优先级、能指导下一步。
- 不按角色分别生成套件。等价候选只形成一条用例,并以列表保留全部贡献
source_role、需求/验收标准追踪和风险标签。 - 只有当触发条件、操作方式或可观察预期存在会改变执行的差异时,才拆成不同用例;相同语义的措辞差异不得导致重复。
与增强版的路由边界
- 本 Skill 继续服务轻量或常规用例编写;它可以接收已整理的角色场景候选,并负责统一去重、来源和需求追踪。
- 当任务需要跨多份异构来源核对冲突与来源有效性、把正式追踪矩阵作为独立交付物,或执行高风险路径正向+异常+边界、数据准备与清理等更高覆盖门槛时,选择
testcase-writer-plus。不要仅因为需要本 Skill 已要求的基础用例字段或Trace就切换;两者保持独立,不合并或改名。
按需加载
- 产出前必须阅读并遵循
prompts/test-case-writing.md(最低覆盖清单、输出结构、质量要求)。 - 需要 Excel/CSV/JSON/Word 等格式时:读
output-formats.md,并按用户格式要求输出。 - 需要套用现成模板时:读
output-templates/中匹配的模板,不要自创冲突结构。 - 用户要示例或对标现有资产时:读
examples/中相关样例。 - 需要框架规范、排障、报告 schema 等深资料时:只读
references/里与当前问题相关的文件,不要整目录通读。 - 需要格式转换或辅助校验时:优先使用
scripts/中已有脚本,而不是重写一遍。 - 需要评测/回归本 skill 时:使用
evals/,并用 skill-up 校验与运行。 - 用户只要最短上手路径时:读
quick-start.md。
交付前自检
- 已遵循主提示词的输出结构
- 最低覆盖关注:范围、用例优先级、前置条件、测试数据、步骤、预期结果、正向场景、异常场景、
source_role与需求追踪…(细节以主提示词为准) - 已输出一套统一用例;等价角色候选已合并,并保留全部贡献角色
- 已覆盖最低清单,或标明为何省略
- 高风险项有明确优先级
- 未编造用户未提供的细节
- 假设与信息缺口已标明
常见误区
- 范围和上下文都不清楚时,不要假装已经完整可用。
- 不要把所有项写成同等重要。
- 不要跳过假设与信息缺口。
- 不要把同一场景复制到产品、QA、UI/UX、技术等多套角色用例中,也不要在合并时丢掉少数来源。
- 不要输出大段与当前工具链无关的空泛理论。
FAQ
What does the test-case-writing skill do?
Use this skill when you need to create high-quality test cases with normal, exception, and boundary scenarios; triggers include 测试用例编写 and test case writing.
How do I install test-case-writing?
Run npx skills add https://github.com/naodeng/awesome-qa-skills --skill test-case-writing in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/test-case-writing/ (personal) or .claude/skills/test-case-writing/ (project).
Which AI agents can use test-case-writing?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is test-case-writing safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains test-case-writing?
It is published by naodeng in naodeng/awesome-qa-skills. It has 482 recorded installs.
More from naodeng/awesome-qa-skills
requirements-analysis
naodeng/awesome-qa-skills
Use this skill when you need to analyze requirements, identify test points, boundaries, dependencies, and risks before test design; triggers include requirements analysis and test point analysis.
test-case-reviewer
naodeng/awesome-qa-skills
Use this skill when you need to review test cases for completeness, clarity, maintainability, and missing scenarios; triggers include test case review and test case QA.
functional-testing
naodeng/awesome-qa-skills
Use this skill when you need to design functional test plans or cases for business flows, UI, data, and integrations; triggers include functional testing and functional test cases.
test-reporting
naodeng/awesome-qa-skills
Use this skill when you need to generate test reports with summary, metrics, defect analysis, and risk assessment; triggers include test reporting and QA status report.
testcase-writer-plus
naodeng/awesome-qa-skills
Use this skill when you need high-quality test cases from requirements and analysis artifacts; triggers include testcase writer plus and advanced test case writing.
api-testing
naodeng/awesome-qa-skills
Use this skill when you need to design API test plans or cases for REST, GraphQL, or gRPC interfaces; triggers include API testing and API test cases.
Popular testing & qa skills
tdd
mattpocock/skills
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
grilling
mattpocock/skills
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
migrate-to-shoehorn
mattpocock/skills
Migrate test files from as type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace as in tests, or needs partial test data.
run-train
lllllllama/rigorpilot-skills
Rigor Train skill for deep learning research repositories. Use when a documented or selected training command should be run conservatively for startup verification, short-run verification, full kickoff, or resume, with command, config, seed, log, checkpoint, status, and metric evidence written to standardized trainoutputs/. Do not use for environment setup, exploratory sweeps, speculative idea implementation, or end-to-end orchestration.
test-driven-development
obra/superpowers
Use when implementing any feature or bugfix, before writing implementation code
finishing-a-development-branch
obra/superpowers
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work