# jacoco/jacoco

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/jacoco-jacoco).**

4,580 stars · 1,200 forks · Java · NOASSERTION

## Links

- GitHub: https://github.com/jacoco/jacoco
- Homepage: https://www.jacoco.org/jacoco
- awesome-repositories: https://awesome-repositories.com/repository/jacoco-jacoco.md

## Topics

`bytecode` `coverage` `groovy` `instrumentation` `jacoco` `java` `java-agent` `java-virtual-machine` `java11` `java17` `java21` `java25` `java26` `java5` `java8` `kotlin`

## Description

JaCoCo is a Java code coverage tool and bytecode instrumenter that measures which parts of source code are executed during tests. It functions as a runtime agent to monitor application execution on the fly or as a library for offline bytecode instrumentation, allowing it to capture execution data in environments where runtime agents are restricted.

The project distinguishes itself by providing both dynamic and static instrumentation paths to track execution. It includes a runtime agent for on-the-fly monitoring and the ability to modify compiled class files before execution. It further enables the retrieval of execution metrics from running processes via remote network connections without interrupting the active application.

The system calculates quantitative coverage metrics across instructions, branches, lines, methods, and classes, alongside cyclomatic complexity measurements. It provides capabilities for merging data from multiple test runs, enforcing coverage thresholds within CI/CD quality gates, and generating reports that map executed bytecode back to source code. Visual integration is available for displaying these results directly within code editors.

The tool integrates with build automation systems and command line interfaces to automate data collection and report generation.

## Tags

### Testing & Quality Assurance

- [Code Coverage Analysis](https://awesome-repositories.com/f/testing-quality-assurance/code-coverage-analysis.md) — Measures the extent to which Java source code is executed by a test suite to identify untested logic. ([source](https://www.jacoco.org/jacoco/trunk/doc/api.html))
- [Code Coverage Tools](https://awesome-repositories.com/f/testing-quality-assurance/code-quality-review/code-coverage-tools.md) — Instruments bytecode to measure the percentage of Java source code executed during automated tests.
- [Coverage Threshold Validation](https://awesome-repositories.com/f/testing-quality-assurance/automated-test-suites/coverage-threshold-validation.md) — Enforces minimum code coverage thresholds during the build process to ensure software meets quality standards.
- [Quality Gates](https://awesome-repositories.com/f/testing-quality-assurance/ci-integration-testing/quality-gates.md) — Integrates with CI/CD pipelines to block code progression if specific coverage quality gates are not met.
- [Visual Coverage Mapping](https://awesome-repositories.com/f/testing-quality-assurance/code-coverage-analysis/coverage-exclusions/visual-coverage-mapping.md) — Displays execution data directly within code editors using visual highlights and gutter decorations. ([source](https://www.jacoco.org/jacoco/trunk/doc/integrations.html))
- [Report Generators](https://awesome-repositories.com/f/testing-quality-assurance/code-coverage-analysis/report-generators.md) — Transforms raw binary execution data into human-readable reports to identify untested sections of the application. ([source](https://www.jacoco.org/jacoco/trunk/doc/examples/build/build.xml))
- [Code Coverage Reportings](https://awesome-repositories.com/f/testing-quality-assurance/software-testing/test-execution-orchestration/code-coverage-reportings.md) — Compares execution metrics against source code to generate reports identifying untested lines and branches.

### Part of an Awesome List

- [Java Agents](https://awesome-repositories.com/f/awesome-lists/devtools/java-frameworks/java-agents.md) — Functions as a Java agent that monitors application execution on the fly to record coverage data.
- [Threshold Enforcements](https://awesome-repositories.com/f/awesome-lists/devtools/code-coverage/threshold-enforcements.md) — Implements validation mechanisms that fail the build process if coverage percentages fall below a predefined minimum. ([source](https://www.jacoco.org/jacoco/trunk/doc/ant.html))
- [Testing Frameworks](https://awesome-repositories.com/f/awesome-lists/devtools/testing-frameworks.md) — Java code coverage library.

### Development Tools & Productivity

- [Code Quality Analysis Tools](https://awesome-repositories.com/f/development-tools-productivity/developer-utilities-libraries/developer-tools/code-quality-verification/code-quality-analysis-tools.md) — Calculates cyclomatic complexity and enforces coverage thresholds to maintain software quality standards.
- [Execution Tracking](https://awesome-repositories.com/f/development-tools-productivity/source-line-tracking/execution-tracking.md) — Records which specific bytecode instructions and branches are executed during a test run using boolean markers.
- [Bytecode-to-Source Mapping](https://awesome-repositories.com/f/development-tools-productivity/source-map-generators/event-to-source-mapping/bytecode-to-source-mapping.md) — Links executed bytecode instructions back to original source code lines and methods for report generation.
- [Large-Scale Codebase Analysis](https://awesome-repositories.com/f/development-tools-productivity/large-scale-codebase-analysis.md) — Uses streaming patterns and depth-first traversals to analyze large projects with thousands of classes while maintaining low memory overhead. ([source](https://www.jacoco.org/jacoco/trunk/doc/implementation.html))
- [Build Tool Integrations](https://awesome-repositories.com/f/development-tools-productivity/workflow-automation-tools/build-task-automation/build-pipeline-integrations/build-pipeline-integrators/build-tool-integrations.md) — Provides native extensions and tasks to integrate coverage data collection into build automation systems. ([source](https://www.jacoco.org/jacoco/trunk/doc/))

### Programming Languages & Runtimes

- [Bytecode Instrumentation Agents](https://awesome-repositories.com/f/programming-languages-runtimes/bytecode-instrumentation-agents.md) — Implements bytecode instrumentation agents to inject tracking probes into compiled Java classes at runtime.
- [Class Definition Hashing](https://awesome-repositories.com/f/programming-languages-runtimes/class-name-mapping/hashed-class-names/class-definition-hashing.md) — Assigns a unique hash to raw class definitions to distinguish between different versions of the same class. ([source](https://www.jacoco.org/jacoco/trunk/doc/implementation.html))
- [Offline Bytecode Instrumentation](https://awesome-repositories.com/f/programming-languages-runtimes/compiler-interpreter-internals/compiler-infrastructure/intermediate-representations/bytecode/offline-bytecode-instrumentation.md) — Modifies compiled class files before execution to enable coverage tracking in environments that prohibit runtime agents. ([source](https://www.jacoco.org/jacoco/trunk/doc/examples/build/pom-offline.xml))
- [Runtime Bytecode Instrumentation](https://awesome-repositories.com/f/programming-languages-runtimes/compiler-interpreter-internals/compiler-infrastructure/intermediate-representations/bytecode/runtime-bytecode-instrumentation.md) — Injects tracking logic into class files during execution via a Java agent to monitor runtime behavior. ([source](https://www.jacoco.org/jacoco/trunk/doc/mission.html))
- [Branch Coverage Tracking](https://awesome-repositories.com/f/programming-languages-runtimes/conditional-branching/branch-coverage-tracking.md) — Analyzes decision statements to determine the number of executed or missed paths in the code. ([source](https://www.jacoco.org/jacoco/trunk/doc/counters.html))
- [Java Instrumentation Frameworks](https://awesome-repositories.com/f/programming-languages-runtimes/java-instrumentation-frameworks.md) — Provides a framework for injecting tracking probes into Java class files via runtime or offline instrumentation.
- [Runtime Bytecode Instrumentation](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-bytecode-instrumentation.md) — Injects tracking probes into class files at runtime using a Java agent to monitor execution paths.

### Software Engineering & Architecture

- [Execution Coverage Metrics](https://awesome-repositories.com/f/software-engineering-architecture/code-complexity-metrics/method-count-limits/method-and-class-size-limits/execution-coverage-metrics.md) — Tracks whether at least one instruction in a method or one method in a class has been executed. ([source](https://www.jacoco.org/jacoco/trunk/doc/counters.html))
- [Class Version Hashes](https://awesome-repositories.com/f/software-engineering-architecture/object-versioning-hashes/class-version-hashes.md) — Assigns unique identifiers to class definitions to ensure execution data matches the correct version of the source code.
- [Cyclomatic Complexity Analyzers](https://awesome-repositories.com/f/software-engineering-architecture/cyclomatic-complexity-analyzers.md) — Computes the minimum number of paths through a method to determine the test cases required for full coverage. ([source](https://www.jacoco.org/jacoco/trunk/doc/counters.html))

### Data & Databases

- [Instrumentation Filters](https://awesome-repositories.com/f/data-databases/data-query-filters/regex-filters/package-selection-filters/instrumentation-filters.md) — Provides rules to include or exclude specific packages and classes from instrumentation to limit data collection. ([source](http://www.jacoco.org/jacoco/trunk/doc/faq.html))
- [Runtime Metrics Extraction](https://awesome-repositories.com/f/data-databases/remote-data-retrieval/runtime-metrics-extraction.md) — Enables retrieval of execution metrics from running processes via remote network connections without interrupting the application. ([source](https://www.jacoco.org/jacoco/trunk/doc/ant.html))

### Networking & Communication

- [Remote Execution Data Extraction](https://awesome-repositories.com/f/networking-communication/remote-execution-data-extraction.md) — Transmits execution metrics from a running process to an external collector via a dedicated network protocol.
