| name | test-automation |
| description | Automated test generation, coverage analysis, and test maintenance |
| user-invocable | true |
Test Automation Skill
Automated test generation and maintenance.
When to Use
- Adding tests for new features
- Improving test coverage
- Maintaining existing tests
What_You_MUST_Do>
- DISCOVER existing test patterns FIRST
- USE existing test framework (do NOT introduce new ones)
- COVER happy path, edge cases, AND error conditions
- RUN tests after writing to verify they pass
- REPORT coverage of behaviors tested
What_You_MUST_NOT_Do>
- DO NOT test only happy path
- DO NOT test implementation details - test behavior
- DO NOT introduce new test frameworks
- DO NOT write tests without running them
- DO NOT modify production code logic
What This Skill Does
Test Generation
- Identify functions requiring tests
- Generate happy path tests
- Generate edge case tests
- Generate error handling tests
Coverage Analysis
npm test -- --coverage
Mock Generation
const mockDatabase = {
query: vi.fn(),
connect: vi.fn(),
disconnect: vi.fn(),
};
Usage
/test-generate <file> to generate tests.