Provides insights on test execution results, test failures, pass rates, and test performance...
This skill provides automatic insights on test execution status without requiring users to parse test output manually.
The skill automatically activates when users mention:
READ-ONLY Operations:
Complements Test Runners:
JIT Help Available: For quick reference on test commands and troubleshooting, see: Cheat Sheet
Jest (JavaScript/TypeScript):
{
"success": false,
"numTotalTests": 145,
"numPassedTests": 142,
"numFailedTests": 3,
"testResults": [
{
"name": "auth/login.test.js",
"status": "failed",
"duration": 2300,
"message": "Expected 401, got 500"
}
]
}
pytest (Python):
{
"tests": [
{
"nodeid": "tests/test_auth.py::test_login_invalid",
"outcome": "failed",
"duration": 1.23,
"longrepr": "AssertionError: expected 401, got 500"
}
],
"summary": {
"passed": 142,
"failed": 3,
"total": 145
}
}
RSpec (Ruby):
{
"examples": [
{
"description": "handles invalid credentials",
"file_path": "./spec/auth/login_spec.rb",
"line_number": 45,
"status": "failed",
"run_time": 0.023,
"exception": {
"message": "expected 401, got 500"
}
}
],
"summary": {
"example_count": 145,
"failure_count": 3
}
}
User Queries:
"What tests failed?" "Show me failing tests" "Which tests are broken?"
Confidence: 🟢 High (0.92)
Skill Response:
3 tests failed:
❌ auth/login.test.js - 'handles invalid credentials' (2.3s)
Module: authentication
Error: Expected 401, got 500
File: src/auth/login.test.js:45
❌ auth/signup.test.js - 'validates email format' (1.8s)
Module: authentication
Error: Validation not triggered
File: src/auth/signup.test.js:78
❌ payments/checkout.test.js - 'processes refund' (0.5s)
Module: payments
Error: Stripe API timeout
File: src/payments/checkout.test.js:120
To fix, check the error messages and file locations above.
Why This Matters:
Next Step: Want to see test stats to understand overall health? Ask "Give me test stats"
User Queries:
"Give me test stats" "Test summary" "How many tests passed?"
Confidence: 🟢 High (0.94)
Skill Response:
📊 Test Execution Summary:
Total Tests: 145
✅ Passed: 142 (97.9%)
❌ Failed: 3 (2.1%)
⏭️ Skipped: 0 (0%)
By Module:
- authentication: 45 tests (3 failed)
- payments: 30 tests (0 failed)
- user-profile: 25 tests (0 failed)
- api-routes: 45 tests (0 failed)
Total Duration: 42.3s
Average: 0.29s per test
Why This Matters:
Next Step: Drill into authentication failures with "Show auth module tests"
User Queries:
"Show auth module tests" "What tests failed in payments?" "Authentication test results"
Confidence: 🟢 High (0.91)
Skill Response:
Authentication Module Tests:
Total: 45 tests
✅ Passed: 42 (93.3%)
❌ Failed: 3 (6.7%)
Failed Tests:
1. login.test.js - 'handles invalid credentials'
2. signup.test.js - 'validates email format'
3. token.test.js - 'refreshes expired tokens'
Duration: 8.5s (average: 0.19s)
To run only auth tests:
npm test -- auth
# or
pytest tests/auth/
Why This Matters:
npm test -- auth to verify fixes without waiting for full suiteNext Step: After fixing auth tests, ask "What tests are newly passing?" to confirm success
User Queries:
"What tests are slowest?" "Show me slow tests" "Which tests take longest?"
Confidence: 🟢 High (0.88)
Skill Response:
🐌 Slowest Tests (>1s):
1. integration/api-e2e.test.js (5.2s)
Status: ✅ Passed
Module: integration
Consider: Mocking external API calls
2. auth/login.test.js (2.3s)
Status: ❌ Failed
Module: authentication
Consider: Database setup might be slow
3. payments/checkout.test.js (1.8s)
Status: ✅ Passed
Module: payments
Consider: Mocking Stripe API
Average test duration: 0.29s
Target: <0.5s per test
Why This Matters:
Next Step: After optimization, re-run "What tests are slowest?" to verify improvements
User Queries:
"What tests are newly passing?" "Recently fixed tests" "Tests that were broken but work now"
Confidence: 🟢 High (0.89)
Skill Response:
✅ Recently Fixed Tests (3):
These tests failed last run but pass now:
1. user-profile/avatar.test.js - 'uploads image'
Was: Failed (file size validation)
Now: ✅ Passed
Fixed: 2 hours ago
2. api-routes/posts.test.js - 'creates new post'
Was: Failed (database constraint)
Now: ✅ Passed
Fixed: 1 hour ago
3. auth/password-reset.test.js - 'sends email'
Was: Failed (email service timeout)
Now: ✅ Passed
Fixed: 30 minutes ago
Great progress! Keep it up!
Why This Matters:
Next Step: Run full test suite again to confirm no regressions: "Give me test stats"
Use Skill (This) For:
Use Test Commands For:
The skill recommends these commands when appropriate:
Jest (JavaScript/TypeScript):
# Run all tests
npm test
# Run specific file
npm test -- auth/login.test.js
# Run tests in watch mode
npm test -- --watch
# Run with coverage
npm test -- --coverage
# Run only failed tests
npm test -- --onlyFailures
pytest (Python):
# Run all tests
pytest
# Run specific module
pytest tests/auth/
# Run specific test
pytest tests/auth/test_login.py::test_invalid_credentials
# Run with verbose output
pytest -v
# Run only failed tests
pytest --lf
RSpec (Ruby):
# Run all tests
rspec
# Run specific file
rspec spec/auth/login_spec.rb
# Run specific test
rspec spec/auth/login_spec.rb:45
# Run only failed tests
rspec --only-failures
User: "How are my tests doing?"
Skill:
✅ Looking good! 142/145 tests passing (97.9%)
3 tests failed in the authentication module.
Want to see the failures?
User: "What failed in auth?"
Skill:
Authentication module has 3 failures:
❌ login.test.js - Invalid credentials (Expected 401, got 500)
❌ signup.test.js - Email validation not triggered
❌ token.test.js - Token refresh failed
All 3 seem related to API status codes. Check auth/routes.js:67
User: "Why are tests so slow?"
Skill:
Total test time: 42.3s (average: 0.29s per test)
🐌 3 tests taking >1s:
- integration/api-e2e.test.js (5.2s) - external API calls
- auth/login.test.js (2.3s) - database setup
- payments/checkout.test.js (1.8s) - Stripe API mock
Recommendation: Mock external services. This could save ~9s (21%)
User: "What's our test coverage?"
Skill:
Test Coverage (from last run):
Lines: 87.3% (2,453 / 2,810)
Branches: 82.1% (445 / 542)
Functions: 91.2% (312 / 342)
Modules needing coverage:
- payments/refund.js: 45% (needs 15 more tests)
- auth/2fa.js: 62% (needs 8 more tests)
- api/webhooks.js: 71% (needs 5 more tests)
To generate updated coverage:
npm test -- --coverage
Process:
cat test-results.json (100 tokens)Total: ~800 tokens
Process:
Total: ~300 tokens
Per Query:
Frequency Impact:
For QA engineers checking test results ~10 times per day:
| Timeframe | Without Skill | With Skill | Savings |
|---|---|---|---|
| Daily (10 queries) | 8,000 tokens | 3,000 tokens | 5,000 (62%) |
| Weekly (50 queries) | 40,000 tokens | 15,000 tokens | 25,000 (62%) |
| Monthly (200 queries) | 160,000 tokens | 60,000 tokens | 100,000 (62%) |
Cost Savings (at Anthropic pricing):
ROI: Implementation cost (~500 tokens) recovered in first day.
If test results don't exist:
Test results file not found.
To generate test results:
Jest: npm test -- --json --outputFile=test-results.json
pytest: pytest --json-report --json-report-file=test-results.json
RSpec: rspec --format json --out test-results.json
Then I can provide insights on your test execution!
If results are stale:
Test results are from 3 days ago.
To get current status:
[appropriate test command for framework]
Then ask me again for up-to-date insights!
docs/01-fundamentals/02_skills-paradigm.md.claude/skills/skill-creation-guide.md.claude/skills/api-debugging/SKILL.md.claude/skills/component-finder/SKILL.mdSkill Version: 3.3.0 Last Updated: 2025-12-12 Target Audience: QA Engineers, Test Engineers, Backend/Frontend developers Maintained By: claude-config-template project