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.
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.
This library consists basically of two separate parts:
- 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).
- Parsers for several code coverage and metric formats:
- Cobertura code coverage results
- Open Clover code coverage results
- Go Coverage results
- JaCoCo code coverage results
- OpenCover code coverage results
- VectorCAST code coverage results including MC/DC, Function, Function Call coverages
- PIT mutation coverage results
- JUnit test results
- NUnit test results
- XUnit test results
- PMD software metrics via a patched version of PMD
All source code is licensed under the MIT license. Contributions to this library are welcome!