.NET Coverage
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Run Coverlet (via dotnet test’s built-in "XPlat Code Coverage" collector) against a scoped or full test run,
then read the generated `coverage.cobertura.xml to report the exact, measured line/branch coverage percentage for
the class(es) the caller cares about. This is the .NET/C# equivalent of iru-java-coverage. It is a read-only
reporting skill: it measures and reports coverage, it does not add tests or modify source/test code unless asked
to as a follow-up.
Purpose
iru-dotnet-coverage answers "does class X meet the coverage bar?" with an exact, Cobertura-XML-derived percentage
instead of an eyeballed guess. It reuses iru-dotnet-test’s selector syntax to scope which tests run, infers or
accepts an explicit list of target classes, and — for classes under the bar — points to the exact uncovered
lines/branches directly from the same XML’s per-line `hits data, without needing a separate HTML report the way
JaCoCo does.
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
No |
Which tests to run, using the exact same syntax as the |
None — omitting it runs the full suite. |
|
No |
Comma-separated class name(s) to report coverage for. |
None — if omitted, target classes are inferred from the test selector by convention ( |
Outputs
-
A plain-text summary in the conversation — never a written file.
-
Per target class: exact line-coverage percentage (and branch coverage where relevant), computed directly from
coverage.cobertura.xml— never estimated. -
If the caller gave a coverage bar (e.g. "at least 80%"): a clear statement of whether each class meets it.
-
For classes under the bar: the exact uncovered line numbers and partially-covered branches, read straight from the Cobertura XML’s per-line
hits/condition-coveragedata. -
A target class absent from the XML entirely is reported as 0% coverage, not as an error.
-
No source or test code is ever modified, and coverage is never re-run to try to raise a number.
Execution flow
Dependencies
Invokes
None — iru-dotnet-coverage is a leaf skill; it only runs dotnet test and reads the generated Cobertura report, it
does not call any other skill in this catalog.
Invoked by
-
.NET Code One Task Group — Step 3, once per task group’s bucket, via the
iru-gate-runneragent, to check every changed/new class in the bucket meets the 80% coverage bar (falling back todotnet test --collect:"XPlat Code Coverage"directly if this skill is unavailable).
Related agents
-
iru-gate-runner—iru-dotnet-code-one-task-group(see .NET Code One Task Group) always invokes this skill from inside airu-gate-runnersub-agent it spawns, not inline.
Source
SKILL.md on GitHub — the file this page was generated from.