https://github.com/jenkinsci/coverage-model
Java API to parse and collect code coverage results
https://github.com/jenkinsci/coverage-model
cobertura coverage coverage-report jacoco junit opencover pit pitest vectorcast
Last synced: 1 day ago
JSON representation
Java API to parse and collect code coverage results
- Host: GitHub
- URL: https://github.com/jenkinsci/coverage-model
- Owner: jenkinsci
- License: mit
- Created: 2023-03-16T09:09:11.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-29T11:43:12.000Z (9 days ago)
- Last Synced: 2025-04-29T12:54:02.327Z (9 days ago)
- Topics: cobertura, coverage, coverage-report, jacoco, junit, opencover, pit, pitest, vectorcast
- Language: Java
- Homepage:
- Size: 2.33 MB
- Stars: 6
- Watchers: 2
- Forks: 39
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Code coverage model
[](https://gitter.im/jenkinsci/code-coverage-api-plugin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[](https://ci.jenkins.io/job/Plugins/job/coverage-model/job/main/)
[](https://github.com/jenkinsci/coverage-model/actions/workflows/ci.yml)
[](https://github.com/jenkinsci/coverage-model/actions/workflows/codeql.yml)
[](https://app.codecov.io/gh/jenkinsci/coverage-model)
[](https://app.codecov.io/gh/jenkinsci/coverage-model)
[](https://github.com/jenkinsci/coverage-model/actions/workflows/quality-monitor.yml)This library Provides a Java API to parse and collect code coverage results.
It is used by my [Jenkins' coverage plug-in](https://github.com/jenkinsci/coverage-plugin) to visualize
the coverage of individual builds.
Additionally, this library is used by my additional [Quality Monitor GitHub Action](https://github.com/uhafner/quality-monitor), 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](https://github.com/uhafner/autograding-github-action) and [GitLab Autograding action](https://github.com/uhafner/autograding-gitlab-action).
This library consists basically of two separate parts:
1. A model to manage several metrics in a software project. 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).
2. Parsers for several code coverage and metric formats:
* [Cobertura](https://cobertura.github.io/cobertura/) code coverage results
* [Open Clover](https://openclover.org/) code coverage results
* [Go Coverage](https://go.dev/doc/build-cover) results
* [JaCoCo](https://www.jacoco.org/) code coverage results
* [OpenCover](https://github.com/OpenCover/opencover) code coverage results
* [VectorCAST](https://www.vector.com/int/en/products/products-a-z/software/vectorcast) code coverage results including MC/DC, Function, Function Call coverages
* [PIT](https://pitest.org/) mutation coverage results
* [JUnit](https://junit.org/junit5/) test results
* [NUnit](https://nunit.org) test results
* [XUnit](https://xunit.net) test results
* [PMD software metrics](https://github.com/uhafner/codingstyle-pom/blob/main/pom.xml#L945-L960) via a patched version of [PMD](https://pmd.github.io/)All source code is licensed under the MIT license. Contributions to this library are welcome!