test-case-generator-v2

test-case-generator-v2 is a skill for Claude Code, Codex from Morningstar202604/awesome-skillkit. It costs 103 tokens per session (1,271 once invoked), scanned A, original, Apache-2.0.

A structured method for creating software test cases from requirements or code. It covers normal and invalid inputs, limits, state changes, failures, repeated requests, and concurrent actions instead of only the happy path.

In plain words
What is it for?
Use it to create a test plan for a new module, fill gaps after development, or add regression tests after fixing a bug. It outputs cases with setup, steps, expected results, priority, and type.
Why use it?
It reduces missed edge cases and makes tests independent, repeatable, and easier to review. It also identifies branches and error paths that existing tests do not cover.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create a test plan for a new module, fill gaps after development, or add regression tests after fixing a bug. It outputs cases with setup, steps, expected results, priority, and type.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/morningstar202604/awesome-skillkit/test-case-generator-v2
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Morningstar202604/awesome-skillkit --skill test-case-generator-v2
Clone the repo
git clone --depth 1 https://github.com/Morningstar202604/awesome-skillkit

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for test-case-generator-v2

README.md
[![agentmods](https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/test-case-generator-v2/github.svg)](https://agentmods.dev/skills/morningstar202604/awesome-skillkit/test-case-generator-v2)
Your own site
<a href="https://agentmods.dev/skills/morningstar202604/awesome-skillkit/test-case-generator-v2"><img src="https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/test-case-generator-v2/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for test-case-generator-v2

Your own site · 80×15
<a href="https://agentmods.dev/skills/morningstar202604/awesome-skillkit/test-case-generator-v2"><img src="https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/test-case-generator-v2.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 103 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,271 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00103 $0.01271
Opus 5.5 $0.00041 $0.00508
Sonnet 5.5 $0.00021 $0.00254
Haiku 4.5 $0.00010 $0.00127

Measured 2mo ago against content hash af426a343303, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

test-case-generator-v2 scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

expert-teams/skills/test-case-generator-v2/SKILL.md · 59 lines

What it actually says

企业级测试用例生成(v2)

本 skill 供 software-qa-engineer(定策略)与 software-tester(补用例收口)共用。核心纪律:只改测试代码、不动业务代码;每个失败用例必须给最小复现步骤;用例必须可独立运行、不依赖执行顺序。

这是什么

一套从需求/代码反向推导用例的方法学模板。它把「想到啥测啥」变成「按维度系统铺开」,重点覆盖边界、异常、状态迁移与并发幂等,而不是只写主流程。

何时使用

  • 门禁四员评审通过后,software-tester 收口补测试,发现覆盖率缺口。
  • 新模块开发完成,qa-engineer 要出测试计划与用例矩阵。
  • 修复线上 bug 后补回归用例,防止复发。

核心步骤

  1. 拆解输入域:对每个函数/接口列出全部输入参数,逐参数做等价类划分。
  2. 画状态迁移:有状态对象(订单、支付、任务)画出状态机,覆盖每个合法/非法迁移边。
  3. 补错误路径:每个外部依赖(DB/缓存/下游/网络)都会失败,构造失败断言。
  4. 补非功能维度:幂等、并发重复提交、超时重试、大数据量、空值与超长输入。
  5. 编号落表:每条用例给唯一 ID、前置、步骤、预期、优先级,可导入用例管理。
  6. 标覆盖率缺口:对照代码标出未覆盖分支与异常路径,不追求无意义的行覆盖数字。

用例设计方法速查

  • 等价类:有效类(正常年龄)+ 无效类(负数、0、超大、类型错、空串、特殊字符)。
  • 边界值:取边界点、边界邻域(min-1/min/min+1、max-1/max/max+1);数组取空/单元素/满页。
  • 判定表:多条件组合(如「VIP + 未支付 + 库存=0」),覆盖关键规则组合而非全排列。
  • 状态迁移:每个状态的入边/出边都要有正向用例,非法跳转要有拒绝用例。
  • 错误注入:mock 下游抛超时/500/断连,断言服务降级、重试次数与幂等。

用例表模板

用例ID 模块 标题 前置条件 步骤 预期结果 优先级 类型
TC-001 下单 正常下单扣库存 商品库存>0 提交下单 返回订单号,库存-1 P0 正向
TC-002 下单 库存为0下单被拒 库存=0 提交下单 409 库存不足,不创建订单 P0 边界
TC-003 下单 并发重复提交不超卖 库存=1 并发两请求 仅一单成功,另一单 409 P0 并发
TC-004 下单 下游支付超时 mock 超时 提交下单 订单挂起,可重试不重复扣款 P1 异常

必测维度清单

  • 每个外部依赖的失败/超时/限流都有用例。
  • 金额、数量、分页、时间边界都取了边界值。
  • 有状态对象的非法迁移被拒绝。
  • 重复请求(幂等键/重试)不产生重复副作用。
  • 鉴权:未登录、越权访问他人资源被拒。
  • 输入校验:超长、特殊字符、类型错误、空值。
  • 回归:本次修的 bug 有对应用例锁住。

易错点

  • 只测 happy path:主流程通了就收工,异常路径零覆盖——这是 v2 首要拒绝项。
  • 用例互相依赖:用例 A 跑过才能跑用例 B,无法独立运行、无法并行。
  • 断言太弱:只断言「返回 200」,不断言数据真的写对了、副作用真的发生了。
  • 追求行覆盖数字:100% 行覆盖但没覆盖异常分支,覆盖率造假。
  • 改业务代码让测试过:本 skill 纪律是只动测试代码;若发现业务逻辑错,上报 reviewer,不擅自改。
  • 遗漏并发与幂等:本地串行测试全绿,线上并发超卖/重复扣款。
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 59 lines · 103 tokens per session scan A af426a343303

Subscribe to this mod's changes

test-case-generator-v2 is a skill published in the GitHub repository Morningstar202604/awesome-skillkit (0 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 103 tokens to every session and 1,271 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-27.

Related

test-case-generator-v2 compared with skills from other repositories

test-case-generator-v2 next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
test-case-generator-v2Morningstar202604/awesome-skillkitSkill02mo agoApache-2.0A103Claude Code, Codex
rust-testingaffaan-m/ECCSkill313k7d agoMITA31Claude Code, Kiro
cpp-testingaffaan-m/ECCSkill313k7d agoMITA34Claude Code, Kiro
golang-testingaffaan-m/ECCSkill313k7d agoMITA37Claude Code, Kiro
swift-protocol-di-testingaffaan-m/ECCSkill313k7d agoMITA32Claude Code, Kiro
tdd-workflowaffaan-m/ECCSkill313k7d agoMITC43Claude Code, Codex
pytest-suitevstorm-co/full-stack-ai-agent-templateSkill2.0k3d agoMITA59Claude Code