csharp-test-coverage

Execute C# tests with coverlet and generate line and branch coverage reports.

6|1|Updated Dec 13, 2017
One-click install
npx skills add https://github.com/esassoc/neptune --skill csharp-test-coverage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: csharp-test-coverage
Source: https://github.com/esassoc/neptune/tree/main/.claude/skills/csharp-test-coverage
Command: npx skills add https://github.com/esassoc/neptune --skill csharp-test-coverage

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps developers identify gaps in their C# test coverage by providing detailed reports on which lines and branches of code are not being tested, including the specific line numbers that are uncovered.

Core Features & Use Cases

  • Detailed Coverage Reports: Generates per-class/method line and branch coverage.
  • Uncovered Line Identification: Pinpoints exact line numbers that lack test coverage.
  • Flexible Filtering: Allows filtering tests and classes to focus analysis.
  • Use Case: After implementing a new feature, run this Skill with a specific test filter to ensure all new code paths in relevant classes are covered, and identify any missing test scenarios.

Quick Start

Run C# tests with coverage analysis, filtering for tests related to 'TreatmentBMPControllerTests' and focusing on classes 'TreatmentBMPs' and 'TreatmentBMPController'.

Frequently Asked Questions about csharp-test-coverage

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

FAQPage Schema
How do I find uncovered lines in C# test coverage reports?

To find uncovered lines in C# test coverage, execute tests with coverlet to generate XML reports that pinpoint exact line numbers lacking test execution. This provides per-class and method line and branch coverage details.

How do I run dotnet tests with code coverage for specific classes only?

Run dotnet tests with code coverage for specific classes by applying optional class filters to the test execution. This targets the analysis to focus solely on the code segments within those filtered classes.

Can I filter C# test execution to analyze coverage for a single test class?

Yes, you can filter C# test execution to analyze coverage for a single test class by applying optional test filters. This restricts the coverage report to only the tests matching the specified filter criteria.

Do I need coverlet and ReportGenerator to analyze C# test coverage?

You need coverlet to execute C# tests with coverage analysis and a Node.js script to parse the XML reports. ReportGenerator is also utilized to produce detailed per-class and method coverage outputs.

What is the best way to identify missing branch coverage in a dotnet project?

The best way to identify missing branch coverage in a dotnet project is using coverlet to run tests and parse the resulting XML reports. This highlights exact uncovered line numbers and branch gaps per method.

Why does C# test coverage analysis require a Node.js script?

C# test coverage analysis requires a Node.js script to parse the XML coverage reports generated by coverlet. This parsing extracts the specific uncovered line numbers and per-method branch coverage data.