chyax98 avatar

Testcase Generator

This generates structured test cases using equivalence class partitioning and boundary value analysis, pulling from your plan.md and requirements docs. It creates one markdown file per test point with concrete test data (no placeholders like {username}), verifiable expected results, and priority labels P1 through P5. The output follows a specific format with 12 test type categories and includes validation scripts to catch duplicate cases or formatting errors. It's aimed at teams that want systematic coverage without manually thinking through every edge case. The instructions are thorough, maybe overly so, with detailed Chinese examples about login forms and ad account filters. Comes with Excel export if you need to hand cases off to a QA tool.

skills.sh installs
368
GitHub stars
12
last updated
Aug 21, 2026

Install

$ npx -y skills add chyax98/twu --skill testcase-generator --agent claude-code

Installs into .claude/skills of the current project.

Files

测试用例生成器(testcase-generator)

1. 目标

根据测试点生成结构化测试用例,覆盖正向、反向、边界场景。

2. 输入输出

  • 输入:test-case/plan.md、clarified-requirements/index.md、CLAUDE.md
  • 输出:test-case/{ITEM}/{POINT}.md、test-case/all_cases.md

3. 核心原则

  1. 策略指导:提供判断标准,而非强制数量
  2. 场景驱动:基于实际场景复杂度生成用例
  3. 数据具体:测试数据必须具体,不用占位符
  4. 可验证性:预期结果必须明确可验证

触发条件

  • 用户执行 /testcase-gen 命令
  • test-case/plan.md 存在

4. 核心理论

4.1 等价类划分法

将输入数据划分为若干等价类,从每类中选取代表性数据测试。

应用示例:

POINT: 用户名密码登录

输入项: 用户名、密码

用户名等价类:
  有效: [6-20字符,字母数字下划线] → "test_user123"
  无效: [<6] "ab" | [>20] "verylongusername12345" | [特殊字符] "user@name" | [空] ""

密码等价类:
  有效: [8-20字符,含大小写+数字] → "Test1234"
  无效: [<8] "Test12" | [缺大写] "test1234" | [空] ""

生成原则: 一次测试一个等价类,其他保持有效

4.2 边界值分析法

边界是最容易出错的地方。

边界三点法: 离点(min-1) | 上点(min) | 内点(中间值) | 上点(max) | 离点(max+1)

应用示例:

用户名长度 6-20 字符:
- 离点-下: 5字符 "abcde" → 失败
- 上点-下: 6字符 "abcdef" → 成功
- 内点: 13字符 "test_user_123" → 成功
- 上点-上: 20字符 "test_user_1234567890" → 成功
- 离点-上: 21字符 "test_user_12345678901" → 失败

4.3 用例数量判断

不强制数量,根据场景复杂度自适应调整。

判断标准:

  • 输入项数量:输入项越多,用例越多
  • 业务规则复杂度:规则越复杂,用例越多
  • 风险等级:Critical 和 High 需要更多用例
  • 测试关注点:关注点越多,用例越多

Sponsors

Details

Repository
github.com/chyax98/twu
Category
Automation & Workflows
First seen
Jun 3, 2026
1jezweb avatarproject-workflowjezweb/claude-skillsNine integrated slash commands for complete project lifecycle: /explore-idea, /plan-project, /plan-feature, /wrap-session, /continue-session, /workflow, /releas366skills.sh installs
2jezweb avatardocs-workflowjezweb/claude-skillsFour slash commands for documentation lifecycle: /docs, /docs-init, /docs-update, /docs-claude. Create, maintain, and audit CLAUDE.md, README.md, and docs/ stru364skills.sh installs
3onewave-ai avatarsales-coaching-plan-generatoronewave-ai/claude-skillsIndividualized development plans by weakness. Skill assessments, call reviews, ride-along checklists, certification tracking.363skills.sh installs
4pmprompt avatarstakeholder-update-generatorpmprompt/claude-plugin-product-managementCreate compelling progress updates and release notes. Use when shipping a new feature or need to communicate progress to stakeholders.361skills.sh installs
5patricio0312rev avatarmermaid-diagram-generatorpatricio0312rev/skillsCreates Mermaid diagrams for flowcharts, sequence diagrams, ERDs, and architecture visualizations in markdown. Use when users request "Mermaid diagram", "flowch343skills.sh installs
6davila7 avatarbrowser-extension-builderdavila7/claude-code-templatesExpert in building browser extensions that solve real problems - Chrome, Firefox, and cross-browser extensions. Covers extension architecture, manifest v3, cont341skills.sh installs