Code coverage model

June 19, 2026 ยท View on GitHub

Join the chat at Gitter/Matrix CI on all platforms CodeQL Line Coverage Branch Coverage Mutation Coverage

This library Provides a Java API to parse and collect code coverage results. It is used by my Jenkins' coverage plug-in to visualize the coverage of individual builds.

Jenkins Coverage Plug-in Overview Jenkins Coverage Plug-in Files

Additionally, this library is used by my additional Quality Monitor GitHub Action, that monitors the quality of projects based on a configurable set of metrics and gives feedback on pull requests (or single commits) in GitHub. There are also two additional actions available to autograde student software projects based on these metrics: GitHub Autograding action and GitLab Autograding action.

Quality Monitor GitHub Action

This library consists basically of two separate parts. The first part is the model to manage several metrics in a hierarchical software project. Metrics can be attached to modules, packages, files, classes, or methods. The values can be aggregated or merged so that it is possible to zoom into every detail level.

Supported metrics are code coverage (line, branch, instruction), mutation coverage (mutation killed rate, test strength), tests (number of tests), and general software metrics (lines of code, non-commenting source statements, cyclomatic complexity, cognitive complexity, NPath-complexity, and class cohesion).

The second part consists of parsers for several report formats:

  • Mutation Coverage
    • PIT mutation coverage results
    • Stryker mutation coverage results

All source code is licensed under the MIT license. Contributions to this library are welcome!