Agent skill
test-generation
Generate comprehensive test cases for code
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/test-generation-duhenri9-wm3-digital
SKILL.md
Test Generation
When to Use
Use this skill when writing tests or when asked to add test coverage.
Test Categories
1. Unit Tests
- Test individual functions/methods
- Mock dependencies
- Cover edge cases
2. Integration Tests
- Test component interactions
- Real dependencies when possible
- Database transactions
3. Edge Cases to Cover
- Empty inputs
- Null/undefined values
- Maximum/minimum values
- Invalid types
- Concurrent access
- Network failures
Test Structure (AAA Pattern)
// Arrange - Set up test data and conditions
// Act - Execute the code under test
// Assert - Verify the results
Naming Convention
[methodName]_[scenario]_[expectedResult]
Example: calculateTotal_emptyCart_returnsZero
Coverage Goals
- Statements: 80%+
- Branches: 75%+
- Functions: 90%+
- Lines: 80%+
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?