Analyze test coverage and create a testing improvement plan
Analyzes test coverage and creates a comprehensive testing improvement plan for the codebase.
/plugin marketplace add dgriffith/bad-daves-robot-army/plugin install dgriffith-bad-daves-robot-army@dgriffith/bad-daves-robot-armyUsing @agent-test-automator prepare a testing review report. You must analyze the test coverage and testing practices in the codebase and create a comprehensive plan WITHOUT making any changes.
The user invoked: /test-review {optional_scope}
Valid scopes:
git status and git diff)git log and git diff)gh pr view and gh pr diff)If scope is "current changes":
git status to identify changed filesgit diff to see uncommitted changesIf scope is "recent changes":
git log --oneline -10 to see recent commitsgit diff HEAD~5..HEAD or appropriate rangeIf scope starts with "PR":
gh pr view {number} to get PR detailsgh pr diff {number} to get the changesIf scope is a path:
If no scope provided:
Test Coverage Assessment
Testing Gaps Analysis
Testing Practice Review
Create a markdown file at /reports/testing-review-{timestamp}.md with:
# Testing Review Plan
Generated: {timestamp}
Scope: {full_path_or_entire_project}
## Executive Summary
Brief overview of testing state and key findings
## Current Testing Status
### Coverage Metrics
- Overall coverage: X%
- Unit test coverage: Y%
- Integration test coverage: Z%
- Critical paths covered: N%
### Test Distribution
- Unit tests: X
- Integration tests: Y
- E2E tests: Z
- Performance tests: N
## Testing Gaps
### Critical Gaps (Untested Core Features)
- [ ] Feature/Function X: No tests
- [ ] Critical path Y: Partial coverage
### High Priority Gaps
- [ ] Error handling: Module X
- [ ] Edge cases: Function Y
### Medium Priority Gaps
- [ ] Integration: Between A and B
- [ ] Performance: Component C
## Test Quality Issues
### Test Maintenance Problems
- Brittle tests in X
- Outdated tests in Y
- Flaky tests in Z
### Test Design Issues
- Over-mocking in tests for A
- Unclear test names in B
- Missing assertions in C
## Testing Improvement Plan
### Phase 1: Critical Coverage (Week 1-2)
1. Add tests for critical feature X
2. Cover error paths in module Y
3. Create integration tests for Z
### Phase 2: Comprehensive Coverage (Week 3-4)
1. Increase unit test coverage to 80%
2. Add edge case tests
3. Implement E2E test suite
### Phase 3: Quality Improvements (Week 5-6)
1. Refactor brittle tests
2. Standardize test structure
3. Improve test documentation
## Test Strategy Recommendations
### Testing Pyramid
- Unit Tests: 70%
- Integration Tests: 20%
- E2E Tests: 10%
### Best Practices to Implement
- Test naming standards
- Test data factories
- Continuous test review
- Coverage monitoring
## Implementation Approach
1. Start with critical untested paths
2. Add tests with each bug fix
3. Refactor tests alongside code
4. Monitor coverage trends
## Tooling Recommendations
- Coverage tools: [Suggestions]
- Test runners: [Suggestions]
- Mocking libraries: [Suggestions]
## Estimated Effort
- Critical gaps: X hours
- Full coverage: Y days
- Quality improvements: Z days
- Total effort: N days
YOU MUST CREATE THE REPORT FILE. This is not optional.
Create the report file using the Write tool at the specified path:
/reports/{command-name}-{scope}-{timestamp}.mdYYYY-MM-DD-HHmmss/reports/architecture-review-entire-project-2025-10-14-143022.mdFill in ALL sections of the report template
Confirm completion by telling the user:
❌ DON'T: Just summarize findings in the chat ❌ DON'T: Say "I'll create a report" without actually doing it ❌ DON'T: Leave sections incomplete or with placeholders ❌ DON'T: Forget to use the Write tool
✅ DO: Always use the Write tool to create the markdown file ✅ DO: Fill in every section with real findings ✅ DO: Provide the full path to the user when done ✅ DO: Include actionable recommendations
Before responding to the user, verify:
Remember: The report is the primary deliverable. The chat summary is secondary.