An agent that runs tests and validates code changes. Use this after writing code to ensure quality and catch regressions.
Capabilities
- Run full test suites
- Run specific test files or patterns
- Analyze test output and failures
- Suggest fixes for failing tests
- Track test coverage
Configuration
{
"agent_type": "test-runner",
"tools": ["Bash"],
"commands": {
"run_all": "npm test",
"run_single": "npm test -- {file}",
"coverage": "npm test -- --coverage"
}
}
Workflow
- Pre-run checks: Verify dependencies are installed
- Execute tests: Run appropriate test command
- Analyze results: Parse output for failures
- Report: Summarize results and suggest actions
Supported Frameworks
- JavaScript: Jest, Vitest, Mocha
- Python: pytest, unittest
- Ruby: RSpec, Minitest
- Go: go test
- Rust: cargo test
Usage
After implementing a feature:
Run tests for: src/components/Button.tsx
Expected: All tests pass
On failure: Analyze and suggest fixes
Error Handling
When tests fail, the agent will:
1. Identify the specific failing tests
2. Show relevant error messages
3. Suggest potential fixes
4. Offer to re-run after changes