jacoco

Parse JaCoCo LINE counters from jacoco.xml and compare coverage against an 80% threshold.

4|Updated Sep 24, 2025
One-click install
npx skills add https://github.com/alexmond/yj-schema-validator --skill jacoco
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: jacoco
Source: https://github.com/alexmond/yj-schema-validator/tree/main/.claude/skills/jacoco
Command: npx skills add https://github.com/alexmond/yj-schema-validator --skill jacoco

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

JaCoCo coverage reports help teams measure code quality and identify gaps in test suites, enabling targeted improvements.

Core Features & Use Cases

  • Coverage thresholds: verify line coverage against a defined minimum (default 80%).
  • Granular reporting: summarize coverage by package and class and surface gaps for remediation.
  • Use Case: integrate into CI to fail builds when coverage dips below the threshold.

Quick Start

Run the JaCoCo analysis and verify the JaCoCo report shows at least 80% line coverage.

Frequently Asked Questions about jacoco

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

FAQPage Schema
How do I verify JaCoCo code coverage meets an 80% threshold in a Maven build?

To verify JaCoCo code coverage, parse the LINE counters from the jacoco.xml file under target/site/jacoco, compute the percentage, and compare it against the 80% threshold. This surfaces gaps by class and package for remediation.

Can I use this to fail a CI build when Java code coverage drops below the minimum?

Yes, you can integrate this JaCoCo coverage analysis into CI to fail builds when line coverage dips below the defined 80% threshold, ensuring code quality by identifying test suite gaps before deployment.

What is the best way to analyze JaCoCo coverage gaps by package and class?

The best way to analyze JaCoCo coverage gaps is by parsing the jacoco.xml report to summarize LINE counter metrics by package and class, computing the percentage coverage to reveal specific areas needing test improvements.

Does JaCoCo coverage analysis work with Java projects built using Maven?

JaCoCo coverage analysis works specifically with Java projects built using Maven, requiring the generated jacoco.xml report located under target/site/jacoco to evaluate line coverage metrics against your thresholds.

Why does my JaCoCo line coverage report show gaps in specific Java classes?

JaCoCo line coverage reports show gaps because the computed LINE counter percentage for those specific Java classes falls below the 80% threshold, indicating insufficient test execution paths in those areas.

How do I parse the jacoco.xml file to compute line coverage percentages?

Parse the jacoco.xml file by extracting LINE counter elements, computing the ratio of covered lines to total lines for each class and package, then comparing the resulting percentage against the 80% minimum threshold.