Get the FREE Ultimate OpenClaw Setup Guide →

test-coverage-analyzer

npx machina-cli add skill a5c-ai/babysitter/test-coverage-analyzer --openclaw
Files (1)
SKILL.md
2.9 KB

Test Coverage Analyzer Skill

Analyzes test coverage comprehensively to identify gaps and ensure adequate test safety nets before undertaking migration efforts.

Purpose

Enable comprehensive test coverage analysis for:

  • Pre-migration coverage assessment
  • Critical path coverage verification
  • Coverage gap identification
  • Test strategy planning
  • Regression risk assessment

Capabilities

1. Line/Branch/Path Coverage Measurement

  • Calculate line coverage percentages
  • Measure branch coverage
  • Analyze path coverage
  • Track condition coverage

2. Coverage Gap Identification

  • Find untested code paths
  • Identify missing edge cases
  • Detect uncovered error handlers
  • Map coverage blind spots

3. Critical Path Coverage Analysis

  • Identify business-critical paths
  • Prioritize coverage by importance
  • Map risk vs coverage
  • Generate focused test recommendations

4. Integration Test Coverage Mapping

  • Track integration point coverage
  • Map API endpoint testing
  • Assess database operation coverage
  • Verify external service testing

5. Coverage Trend Analysis

  • Track coverage over time
  • Identify coverage regression
  • Monitor improvement progress
  • Generate trend reports

Tool Integrations

ToolLanguageIntegration Method
Istanbul/nycJavaScript/TypeScriptCLI
JaCoCoJavaCLI / Maven/Gradle
CoberturaJava/PythonCLI
Coverage.pyPythonCLI
SimpleCovRubyCLI
go test -coverGoCLI
dotCover.NETCLI

Output Schema

{
  "analysisId": "string",
  "timestamp": "ISO8601",
  "coverage": {
    "line": {
      "percentage": "number",
      "covered": "number",
      "total": "number"
    },
    "branch": {
      "percentage": "number",
      "covered": "number",
      "total": "number"
    },
    "function": {
      "percentage": "number",
      "covered": "number",
      "total": "number"
    }
  },
  "gaps": [
    {
      "file": "string",
      "uncoveredLines": ["number"],
      "uncoveredBranches": ["string"],
      "criticality": "high|medium|low",
      "recommendation": "string"
    }
  ],
  "criticalPaths": {
    "covered": "number",
    "total": "number",
    "uncoveredPaths": []
  }
}

Integration with Migration Processes

  • migration-testing-strategy: Coverage baseline establishment
  • code-refactoring: Pre-refactoring safety assessment
  • framework-upgrade: Regression protection verification

Related Skills

  • characterization-test-generator: Generate tests for gaps
  • static-code-analyzer: Combined quality analysis

Related Agents

  • migration-testing-strategist: Uses for test planning
  • regression-detector: Uses for regression prevention

Source

git clone https://github.com/a5c-ai/babysitter/blob/main/plugins/babysitter/skills/babysit/process/specializations/code-migration-modernization/skills/test-coverage-analyzer/SKILL.mdView on GitHub

Overview

Test Coverage Analyzer assesses coverage to identify gaps that could compromise migration safety nets. It supports pre-migration baselining, critical-path verification, and gap-driven test planning to reduce regression risk.

How This Skill Works

It measures line, branch, and path coverage, detects untested paths and missing edge cases, and prioritizes coverage for business-critical paths. It also maps integration test coverage, analyzes coverage trends over time, and provides focused test recommendations aligned with migration goals.

When to Use It

  • Before migrating a codebase, to establish a coverage baseline
  • When verifying that critical business paths are thoroughly tested
  • To identify coverage gaps, missing edge cases, and uncovered error handlers
  • During test strategy planning for migrations and framework upgrades
  • For regression risk assessment and trend monitoring across migrations

Quick Start

  1. Step 1: Instrument the project with appropriate coverage tools (Istanbul/nyc, JaCoCo, Coverage.py, etc.)
  2. Step 2: Run coverage analysis to collect line, branch, and path metrics
  3. Step 3: Review gaps, prioritize critical paths, and generate targeted test recommendations

Best Practices

  • Run a baseline coverage using supported tools (Istanbul/nyc, JaCoCo, Coverage.py, etc.)
  • Prioritize critical paths and integration points first
  • Document uncovered gaps and assign owners for remediation
  • Track coverage trends over time to detect regressions
  • Re-run coverage after code changes or refactors to validate safety nets

Example Use Cases

  • Assess a Java service's migration using JaCoCo to locate uncovered paths
  • Map API endpoint test coverage during migration of microservices
  • Identify uncovered error handlers in a Python module prior to rollout
  • Compare coverage before and after a refactor to ensure regression safety
  • Plan regression tests for a Go service using go test -cover

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers