agentic-testcase-generator
v1.0.0
Published
AI-powered test case generation from requirement documents. Works with Claude Code, Cursor AI, GitHub Copilot, Codex, Windsurf, and Antigravity.
Maintainers
Readme
Agentic Testcase Generator
AI-powered test case generation from requirement documents. Works with Claude Code, Cursor AI, GitHub Copilot, OpenAI Codex, Windsurf, and Google Antigravity.
Drop your PRD/SRS/spec into input/, and the AI agent walks you through a structured 3-step workflow: Refinement → Planning → Execution — with human review at every step.
Supported Platforms
| Platform | Config format |
|----------|--------------|
| Claude Code | .claude/ (agents, skills, rules) |
| Cursor AI | .cursor/rules/*.mdc |
| GitHub Copilot | .github/copilot-instructions.md |
| OpenAI Codex | AGENTS.md |
| Windsurf (Codeium) | .windsurfrules |
| Google Antigravity | AGENTS.md |
Quick Start
Option 1: npx (recommended)
# Setup for your AI tool
npx agentic-testcase-generator init --platform claude
npx agentic-testcase-generator init --platform cursor --lang vi
npx agentic-testcase-generator init --platform claude,cursor,copilotOption 2: Clone from GitHub
git clone https://github.com/ngochiep30051998/agentic-testcase-generator.git
cd agentic-testcase-generator
npm install
# Then init for your platform
node bin/cli.js init --platform claude --lang viOption 3: npx clone (for customization)
npx agentic-testcase-generator clone --platform cursor --lang viCLI Commands
# Scaffold config for a platform
npx agentic-testcase-generator init --platform <name> [--lang vi|en]
# Clone full repo for customization
npx agentic-testcase-generator clone [--dir <path>] [--platform <name>] [--lang vi|en]
# List supported platforms
npx agentic-testcase-generator platforms| Option | Description |
|--------|-------------|
| --platform | Target platform: claude, cursor, copilot, codex, windsurf, antigravity. Multiple: claude,cursor |
| --lang | Skill language: en (default) or vi (Vietnamese) |
| --dir | Clone destination (default: agentic-testcase-generator) |
Init Examples by Platform
# Claude Code
npx agentic-testcase-generator init --platform claude --lang vi
# → Creates: .claude/agents/, .claude/skills/, .claude/rules/, CLAUDE.md
# Cursor AI
npx agentic-testcase-generator init --platform cursor --lang vi
# → Creates: .cursor/rules/testcase-generator.mdc
# GitHub Copilot
npx agentic-testcase-generator init --platform copilot --lang en
# → Creates: .github/copilot-instructions.md
# OpenAI Codex
npx agentic-testcase-generator init --platform codex --lang en
# → Creates: AGENTS.md
# Windsurf (Codeium)
npx agentic-testcase-generator init --platform windsurf --lang vi
# → Creates: .windsurfrules
# Google Antigravity
npx agentic-testcase-generator init --platform antigravity --lang vi
# → Creates: AGENTS.md
# Multiple platforms at once
npx agentic-testcase-generator init --platform claude,cursor,copilot --lang viHow It Works
1. Place documents in input/
| Format | Support |
|--------|---------|
| .md (Markdown) | Recommended |
| .txt (Text) | Direct read |
| .pdf | Max 20 pages/read |
| .doc / .docx (Word) | Auto convert to .md |
2. Ask your AI tool to generate
# Claude Code
claude "Generate testcases from input/my-feature.md"
# Cursor / Copilot / Others
Open your AI chat and type: "Generate testcases from input/my-feature.md"3. AI walks you through 3 steps
Step 0 (Optional): Training
- Place sample testcases in
training/ - Say "training" to activate
- AI learns writing style, proposes new usecases
- You approve → say "next"
Step 1: Refinement
- AI reads document, extracts features, entities, fields, roles
- Suggests areas needing more coverage
- Asks clarifying questions
- You answer questions → say "next"
Step 2: Planning
- AI classifies tests by module, proposes Excel sheet structure
- Estimates TC count based on actual complexity (not limited by config)
- Presents detailed plan: modules, features, estimated TCs
- You adjust if needed → say "generate"
Step 3: Execution
- AI asks: merge into one file or split per module?
- AI asks: sequential or parallel writing? (if >= 3 modules)
- Writes test cases, exports Markdown + Excel
- You review → AI iterates on feedback
4. Get results in output/
| File | Description |
|------|-------------|
| *-testcases.md | Test cases in Markdown |
| *-testcases.xlsx | Excel with multiple sheets + Summary sheet |
| *-summary.md | Summary report |
Excel includes:
- Summary sheet: Total TCs, Pass/Fail/Blocked/Skip, Pass Rate
- Module sheets: Separated by module, e.g. "Login (8 TCs)"
- Columns: No, ID, Type, Description, Steps, Expected Result, Priority, Dev, QC, Note
Configuration
Edit config.yaml:
Output language
language: vi # vi (Vietnamese) | en (English)Coverage depth
coverage_depth: standard| Value | Description | TCs/feature (reference) |
|-------|-------------|------------------------|
| minimal | Happy path + basic validation | ~10-15 |
| standard | All main categories | ~20-40 |
| thorough | Deep edge cases, combinatorial | ~40-80+ |
TC count is a suggestion. AI evaluates actual complexity and proposes accordingly.
Test case categories
categories:
functional: true # Happy path, CRUD
validation: true # Required fields, format, length
boundary: true # Min/max, edge values
negative: true # Invalid data, error states
ui_ux: true # Loading, disabled states
authorization: true # Role-based access
error_handling: true # Network errors, timeouts
empty_state: true # No data states
integration: false # Cross-module
e2e: false # Full user journeys
security: false # XSS, injection, CSRF
performance: false # Load times, limitsProject info (optional)
project:
name: "My Project"
type: "web" # web | api | mobile
stack: "NestJS + React"
base_url: "http://localhost:3000"
api_url: "http://localhost:8080/api/v1"Utilities
# Export Excel manually
node scripts/export-xlsx.js output/feature-testcases.md
node scripts/export-xlsx.js --lang en output/feature-testcases.md
# Convert Word to Markdown
node scripts/convert-word.js input/document.docx
node scripts/convert-word.js input/ # Convert all .doc/.docxProject Structure
agentic-testcase-generator/
├── bin/
│ └── cli.js # CLI entry point
├── core/ # Skills in English (source of truth)
│ ├── skills/ # 0-training, 1-refinement, 2-planning, 3-execution
│ ├── rules/ # output-format, coverage-standards
│ ├── templates/ # Markdown + summary templates
│ └── config.yaml # Default config
├── i18n/
│ └── vi/ # Vietnamese translation
│ ├── skills/
│ ├── rules/
│ └── templates/
├── adapters/ # Platform-specific generators
│ ├── claude.js
│ ├── cursor.js
│ ├── copilot.js
│ ├── codex.js
│ ├── windsurf.js
│ └── antigravity.js
├── scripts/ # Utilities
│ ├── export-xlsx.js # Export Excel (.xlsx)
│ ├── export-csv.js # Export CSV (UTF-8 BOM)
│ └── convert-word.js # Convert Word to Markdown
├── templates/ # Output templates
├── training/ # Sample documents for training
├── input/ # Requirement documents go here
├── output/ # Generated test cases
├── config.yaml # User configuration
├── package.json
└── README.mdAuthor
Nguyen Ngoc Hiep
- Website: hiepnn.com
- LinkedIn: linkedin.com/in/hiep-nguyen
License
MIT License — Free and open source. Use, modify, and distribute freely.
If you find this useful, please give it a Star on GitHub!
