| name | test-runner |
| description | Guide for running and analyzing test results across different languages and frameworks. Use this when you need to run tests, interpret test failures, or ensure test coverage. |
Test Runner Skill
This skill provides standardized ways to run tests and interpret results.
Test Commands by Language
Python
python -m pytest tests/ -v
python -m pytest tests/test_specific.py -v
python -m pytest tests/ --cov=src --cov-report=term-missing
JavaScript/TypeScript
npm test
npm test -- --grep "test name"
npm run test:coverage
Go
go test ./...
go test -v ./...
go test -cover ./...
Interpreting Results
Success Indicators
- All tests pass
- No deprecation warnings
- Coverage meets threshold
Failure Patterns
Test Assertion Failed
AssertionError: Expected X, got Y
→ Fix the code to produce expected output
Import Error
ModuleNotFoundError: No module named 'xyz'
→ Install missing dependency or fix import path
Timeout
TimeoutError: Test exceeded 30s limit
→ Optimize the code or increase timeout
Quick Actions
Fix Failing Test
- Read the error message carefully
- Find the relevant code
- Fix the issue
- Re-run just that test
Add Missing Test
- Identify untested code
- Create test file if needed
- Write test following existing patterns
- Run to verify it passes