mcpField
C
coverage

coverage

github.com/amplicodeTesting & quality134244 installsUpdated 8w ago
Repository

About coverage

A testing skill for measuring Gradle test coverage by suite and optionally by module, package, or class. It selects an IDE or console workflow based on project availability and returns a focused report through a Haiku subagent.

Key features

  1. 01Coverage for combined, unit, or integration tests
  2. 02Narrow coverage by module, package, or class
  3. 03Choose IDE or console Gradle workflow
  4. 04Summarize results in a Haiku subagent

Use cases

  1. 01Compare coverage from unit tests alone with integration tests
  2. 02Inspect coverage for a specific subproject or test class

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/amplicode/spring-skills --skill coverage

After installing, type/coveragein Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
gradle.md
ide.md
report.md
scripts/
coverage_in_ide.kts
load_coverage_into_ide.kts

Details

From the project README

Coverage

What to cover

Same two dimensions as the run-tests skill — test type, optionally narrowed to a module / group:

Coverage byTypical Gradle taskMeaning
all (default)jacocoTestReportBoth suites merged (test + testIntgr) — what the baseline is expressed in. Needs Docker.
unitjacocoTestReport -x testIntgrWhat the fast tests alone cover.
integrationjacocoTestReport -x testWhat the Testcontainers tests alone cover. Needs Docker.
+ a module / group--tests <glob>, or a subproject path (:web:test)Narrows any of the above to one package/class/subproject.

Pick the path

Probe FIRST, here, before loading either reference — so you read only the one you need. Call steroid_list_projects (via ToolSearch if the tool schema isn't loaded):

  • It returns the repo you're in → IDE path: note that entry's project_name and follow references/ide.md (runs the coverage Gradle task inside the IDE in its own Run tab). Its steps start already knowing the project_name — don't re-probe.
  • It fails, or the repo isn't listed → console Gradle path: follow references/gradle.md (runs Gradle in the console) and tell the user you used the console fallback because the IDE wasn't reachable.

Both paths end by collecting the result in a Haiku subagent that returns the references/report.md report and nothing else — keeping the long build/coverage output out of the main context. Act on that report in the main model.

Comments

Markdown supported