Agent skill
test-writing
Write comprehensive tests for code including unit tests, integration tests, and end-to-end tests. Use this to ensure code quality, catch bugs, and validate functionality.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/test-writing-karmaloopai-jiva
SKILL.md
Test Writing Skill
Overview
Create thorough test coverage for software components.
Workflow
- Analyze Code: Understand what needs testing
- Identify Test Cases:
- Happy path scenarios
- Edge cases
- Error conditions
- Boundary values
- Write Tests: Create test files following project conventions
- Verify: Run tests to ensure they pass
- Document: Add test descriptions
Test Types
Unit Tests
- Test individual functions/methods
- Mock dependencies
- Fast execution
- High coverage
Integration Tests
- Test component interactions
- Real dependencies when possible
- Test data flow
- API contracts
End-to-End Tests
- Test complete user workflows
- Real environment
- Critical paths
- User scenarios
Test Quality Standards
- Clear test names describing what is tested
- Arrange-Act-Assert pattern
- One assertion per test (generally)
- Independent tests (no shared state)
- Fast and reliable
Tools
view: To read code being testedcreate_file: To create new test filesrun_terminal_command: To execute test suitesgrep_search: To find existing tests
Best Practices
- Test behavior, not implementation
- Cover edge cases thoroughly
- Keep tests maintainable
- Use descriptive test names
- Don't test framework code
- Mock external dependencies
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?