GitXplorerGitXplorer
r

cover2cover

public
55 stars
50 forks
5 issues

Commits

List of commits on branch master.
Verified
3f78052d0e7c1aab2874fc000c2f1eada088fe85

fix: make Python 3 compatible (#10)

kkayman-mk committed a year ago
Unverified
1ed86ab645d91746ada21016db0fc8b3dc1b9f3e

Merge pull request #4 from Musiqua/MultiSource

rrix0rrr committed 8 years ago
Unverified
bc3859e5eb2d18cf98dacdde80d00ec5a663a174

Added possibility to add multiple sources as arguments.

committed 8 years ago
Unverified
7a9033532fc1dc5928ff16b9603dbc5a058f2906

Merge pull request #3 from infospace/master

rrix0rrr committed 8 years ago
Unverified
f4f27643f34858fadf3b4ea58c59f3a9923440b3

fix some indentation

mmgreen committed 8 years ago
Unverified
d6df7107f5873806eeec830734b1674c8f4a1fa0

fix some bugs in xml parsing

mmgreen committed 8 years ago

README

The README file for this repository.

cover2cover

A script for converting JaCoCo XML coverage reports into Cobertura XML coverage reports.

Motivation

I created this script because I wanted code coverage reports in Jenkins[1]. Since Cobertura[2] doesn't support Java 1.7 or higher (the project seems abandoned), we had to use JaCoCo[3], which is great coverage tool and very easy to use.

However, the Jenkins JaCoCo plugin[4] leaves a lot to be desired, while Cobertura's Jenkins plugin[5] is a lot better. To be precise, it supports:

  • Trend graphs for packages, classes, etc. instead of just lines
  • Trend graphs in percentages instead of absolute numbers
  • High and low "water marks" that cause the build to become unstable in Jenkins

Until the JaCoCo plugin is up to speed, this script can be used to convert JaCoCo XML reports into Cobertura XML reports, so we can continue to use the Cobertura Jenkins plugin to track coverage.

Not every feature is supported, but close enough.

Usage

Add the following "post step" to your Jenkins build:

mkdir -p target/site/cobertura && cover2cover.py target/site/jacoco/jacoco.xml src/main/java > target/site/cobertura/coverage.xml

And add the Cobertura plugin with the following path:

**/target/site/cobertura/coverage.xml

(Note: The above assumes a Maven project)