test-generator
3
总安装量
2
周安装量
#54999
全站排名
安装命令
npx skills add https://github.com/ai-engineer-agent/ai-engineer-skills --skill test-generator
Agent 安装分布
trae
2
gemini-cli
2
claude-code
2
codex
2
kiro-cli
2
cursor
2
Skill 文档
Test Generator
Generate comprehensive tests for $ARGUMENTS:
Process
- Read the source file to understand the API surface
- Detect the language and testing framework from the project setup
- Identify existing tests to avoid duplication
- Generate tests covering:
Test Categories
Happy Path Tests
- Normal inputs produce expected outputs
- All public methods/functions are exercised
- Common use cases are covered
Edge Cases
- Empty inputs (empty strings, arrays, objects)
- Boundary values (0, -1, MAX_INT, empty collections)
- Single-element collections
- Unicode and special characters
Error Cases
- Invalid inputs (wrong types, out-of-range values)
- Missing required fields
- Network/I/O failures (when applicable)
- Permission errors
Integration Tests (when appropriate)
- Component interactions
- Database operations
- API endpoint responses
Style Rules
- Follow the existing test style in the project
- Use descriptive test names that read as documentation
- Use arrange-act-assert (given-when-then) structure
- One assertion concept per test
- Mock external dependencies, test internal logic directly
- Use factories/builders for test data, not inline object literals
Output
Create the test file at the conventional location for the project’s language and framework. If tests already exist, add missing test cases.