coverage-analysis

Analyze .NET project code coverage and CRAP scores from Cobertura XML.

3|Updated Mar 18, 2024
One-click install
npx skills add https://github.com/deveel/deveel.events --skill coverage-analysis-deveel
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coverage-analysis
Source: https://github.com/deveel/deveel.events/tree/main/.agents/skills/coverage-analysis
Command: npx skills add https://github.com/deveel/deveel.events --skill coverage-analysis-deveel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Automates project-wide code coverage assessment and CRAP scoring for .NET projects with existing unit tests, surfacing risky, under-tested areas to guide improvement.

Core Features & Use Cases

  • Detects the coverage provider (Microsoft Code Coverage or Coverlet) and runs dotnet test accordingly to emit Cobertura XML.
  • Aggregates Cobertura XML from multiple test projects to compute per-method CRAP scores and surface hotspots.
  • Generates a coverage report (HTML/Text/Markdown) when ReportGenerator is available, and exposes coverage gaps for prioritization.

Quick Start

Run the skill against a .NET solution to generate a CRAP-aware coverage analysis report across all test projects.

Frequently Asked Questions about coverage-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate CRAP scores across a .NET solution to find untested methods?

Calculating CRAP scores across a .NET solution involves running dotnet test with a detected coverage provider, merging Cobertura XML from multiple test projects, and computing per-method CRAP scores to surface risky hotspots.

What is a CRAP score in .NET code coverage analysis?

A CRAP score in .NET code coverage analysis quantifies method risk by combining cyclomatic complexity with test coverage gaps. It highlights under-tested, highly complex methods that require prioritized testing improvements.

Does this coverage analysis tool support both Microsoft Code Coverage and Coverlet?

Yes, the coverage analysis supports both Microsoft Code Coverage and Coverlet. It automatically detects the active provider and executes dotnet test with the appropriate data collector to emit Cobertura XML files.

How do I merge Cobertura XML files from multiple .NET test projects?

To merge Cobertura XML files from multiple .NET test projects, the skill aggregates the emitted coverage data across the solution to compute per-method CRAP scores and identify project-wide coverage gaps.

Can I generate HTML coverage reports with ReportGenerator for .NET projects?

Yes, you can generate HTML, Text, or Markdown coverage reports when ReportGenerator is available. The skill leverages it to produce detailed reports exposing coverage gaps for prioritization.