AST-based test coverage analysis - identifies untested code and coverage gaps
Analyzes test coverage using AST-based static analysis and pytest execution to identify gaps, skipped tests, and quality issues.
/plugin marketplace add akaszubski/autonomous-dev/plugin install autonomous-dev@autonomous-devOptional flags - --layer [unit|integration|e2e], --no-skip, --fixAnalyze test coverage using AST-based static analysis and pytest execution. Identifies coverage gaps, skipped tests, and test quality issues.
Invoke the test-coverage-auditor agent to perform coverage analysis.
ARGUMENTS: {{ARGUMENTS}}
Parse the ARGUMENTS for optional flags:
--layer [unit|integration|e2e]: Filter analysis to specific test layer--no-skip: Omit skipped tests section from report--fix: Generate test stubs for coverage gaps (future feature)Use the Task tool to invoke the test-coverage-auditor agent with subagent_type="test-coverage-auditor" and provide the flags.
Performs comprehensive test coverage analysis:
Time: 3-5 minutes (depends on test suite size)
# Analyze all test coverage
/audit-tests
# Analyze only unit tests
/audit-tests --layer unit
# Analyze integration tests
/audit-tests --layer integration
# Analyze without skipped tests section
/audit-tests --no-skip
# Combine flags
/audit-tests --layer unit --no-skip
The auditor provides a comprehensive report:
For each untested item:
For each skipped/xfailed test:
Per-layer statistics:
Quality issues found:
Use /audit-tests when:
Recommended thresholds:
Skip rate threshold:
Coverage Summary:
- Total testable items: 45
- Total covered: 38
- Coverage: 84.4%
- Total tests: 120
- Skip rate: 5.8%
Coverage Gaps (7):
- calculate_discount (function) in src/pricing.py [unit]
- PaymentProcessor.refund (class) in src/payments.py [integration]
- export_report (function) in src/reports.py [unit]
Skipped Tests (7):
- test_api.py::test_payment_flow - External API unavailable [SKIPPED]
- test_auth.py::test_oauth_login - Flaky test, needs investigation [SKIPPED]
Layer Coverage:
- unit: 95 tests, 90 passed, 94.7% coverage
- integration: 20 tests, 18 passed, 90.0% coverage
- e2e: 5 tests, 5 passed, 100% coverage
Warnings:
- Test test_auth.py::test_oauth_login skipped without reason
/auto-implement: Implements features with TDD (includes test generation)/health-check: Validates overall project health (includes test validation)Use /audit-tests to understand test coverage, identify gaps, and improve test quality. Focus on critical paths and new features first.