Java Coverage
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Run JaCoCo (or Kover) against a scoped or full unit-test run of a JVM project — Java or Kotlin sources, Maven or Gradle — then read the generated CSV/XML report to give the exact, measured line-coverage percentage for the specific class(es) the caller cares about. This is a read-only reporting skill: it measures and reports coverage, it does not add tests or modify source/test/build code unless asked to as an explicit follow-up.
Purpose
iru-java-coverage answers "does class X meet the coverage bar?" with an exact, report-derived percentage instead of
an eyeballed guess from test output. It detects the build tool and coverage engine (Maven with jacoco-maven-plugin;
Gradle with JaCoCo, using a throwaway init script that forces CSV/XML reports on without touching the build; Gradle
with Kover; Quarkus with quarkus-jacoco), reuses iru-java-test’s selector syntax to scope which tests run, infers
or accepts an explicit list of target classes (including Kotlin’s compiler-generated `FooKt, Foo.Companion and
lambda classes), and, for classes under the bar, points to the exact uncovered lines/branches in the per-class HTML
or XML report. It measures unit tests only and never runs Failsafe, verify, integrationTest or quarkusIntTest.
Android Gradle builds are redirected to iru-android-coverage.
When the Kotlin Multiplatform plugin is applied anywhere in the build, the skill stops and points to KMP Coverage instead.
Plugin
Shipped by the iru-java plugin of the ai-catalog marketplace (install with /plugin install iru-java@ai-catalog; see Plugins).
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
No |
Which tests to run, using the exact same syntax as the |
None — omitting it runs the full unit 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/instruction coverage where relevant), computed from the CSV or JaCoCo-format XML counters — never estimated — labelled with the engine it came from (JaCoCo Maven, JaCoCo Gradle, Kover,
quarkus-jacoco). -
If the user gave a coverage bar (e.g. "at least 80%"): a clear statement of whether each class meets it.
-
For classes under the bar: a pointer to the per-class HTML report and the exact uncovered line numbers (via the
nc/pc/fcspan classes, or the XML<line>entries) rather than just the aggregate percentage. -
A class absent from the report is reported as 0% coverage, not as an error. Kotlin generated-code noise (
inlinebodies, companion rows, coroutine state machines) is called out as such. -
Quarkus:
@QuarkusTestcoverage fromquarkus-jacocoand plain-unit-test coverage are reported separately, never summed; classes exercised only by@QuarkusComponentTestwithoutquarkus-jacocoare reported as unmeasured, not 0%. -
A build, compilation or test failure (including a Docker-less Testcontainers/Dev Services start-up failure) is reported as such instead of reading a stale report.
-
No source, test or build code is ever modified, and coverage is never re-run to try to raise a number.
Execution flow
Dependencies
Invokes
None — iru-java-coverage is a leaf skill; it only runs Maven/Gradle commands and reads the generated reports. It
reuses the build-tool detection and selector syntax documented in Java Test, and redirects
Android Gradle builds to Android Coverage, but it does not call either skill.
It also points Kotlin Multiplatform projects at KMP Coverage but does not invoke it.
Invoked by
-
Java 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 tomvn jacoco:prepare-agent test jacoco:reportdirectly if this skill is unavailable). -
Kotlin Spring Boot Code One Task Group — Step 3.5, unit-only 80% coverage gate, via the
iru-gate-runneragent. -
Quarkus Code One Task Group — Step 3.5 and 3.9, unit-stage 80% gate and aggregate report, via the
iru-gate-runneragent. -
Java Generate All Tests — Step 3, and again in Step 6 to re-measure after generation: delegated through the
iru-gate-runneragent so its fulljacoco.csv/HTML-derived report never lands directly in this conversation, and so the whole suite runs once per batch rather than once per class. -
Java Spring Boot Code One Task Group — Step 3.5, via
iru-gate-runner, measuring the 80% gate over a Surefire-only run. Falls back tomvn clean jacoco:prepare-agent test jacoco:report -DskipITsplus each module’s ownjacoco.csv— never the aggregate, which mixes in integration execution data.
Related agents
None — this skill spawns no agents itself; callers run it inside an
iru-gate-runner sub-agent.
Source
SKILL.md on GitHub — the file this page was generated from.