JaCoCo Plugin

Skip to end of metadata
Go to start of metadata

Plugin Information

Plugin ID jacoco Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
Dependencies
1.0.19 (archives)
Apr 07, 2015
1.424.6
dashboard-view (version:2.1, optional)
Source Code
Issue Tracking
Pull Requests
Maintainer(s)
GitHub
Open Issues
Pull Requests
Kohsuke Kawaguchi (id: kohsuke)
Stephen Connolly (id: stephenconnolly)
Manuel Carrasco Monino (id: manolo)
Jonathan Fuerth (id: jfuerth)
David Carver (id: kingargyle)
Ognjen Bubalo (id: ognjenb)
Dominik Stadler (id: centic)
Usage Installations 2014-Jul 3557
2014-Aug 3692
2014-Sep 3944
2014-Oct 4248
2014-Nov 4423
2014-Dec 4470
2015-Jan 4754
2015-Feb 5001
2015-Mar 5453
2015-Apr 5639
2015-May 5781
2015-Jun 6020
Unfortunately JaCoCo 0.7.5 breaks compatibility to previous binary formats of the jacoco.exec files, the JaCoCo plugin is currently based on JaCoCo 0.7.4, thus you cannot use this plugin with projects which already use JaCoCo 0.7.5 or newer, please stick to 0.7.4 or lower for now until the plugin is updated
Basic information

This plugin allows you to capture code coverage report from JaCoCo. Jenkins will generate the trend report of coverage.

This plugin is fork of the Emma Plugin. Big part of the code structure comes from it, however, it is completely refactored.

It also includes functionality similar to the Emma Coverage Column which allows to include a column in Dashboards
which displays the latest overall coverage numbers and links to the coverage report.

Getting Started

The plugin provides two things, a build-publisher to record and display coverage data as part of builds as well as a new
column-type for dashboard views which can display coverage data in Dashboards.

Recording coverage for builds

Get coverage data as part of your build

First you need to get coverage calculated as part of your build/tests, see the JaCoCo documentation
for details. You need at least one or more *.exec file available after tests are executed. Usually this means adjusting
your Maven pom.xml or Ant build.xml file..

Set up coverage retrieval and publishing

In order to get the coverage data published to Jenkins, you need to add a JaCoCo publisher and configure it so it will
find all the necessary information. Use the help provided via the question-mark links for more information. Basically
you specify where the *.exec files are, where compiled code can be found and where the corresponding source code is
located after the build is finished to let the plugin gather all necessary pieces of information..

Run the job

After the job executed, the build-output will show that the JaCoCo-publisher is executed and collects the data. This
output can also give hints if something goes wrong at this stage:

Zeichne Testergebnisse auf.
[JaCoCo plugin] Collecting JaCoCo coverage data...
[JaCoCo plugin] build/*.exec;build/*-classes;src/java,src/*/java,src/*/src; locations are configured
[JaCoCo plugin] Number of found exec files: 5
[JaCoCo plugin] Saving matched execfiles:  .../build/jacoco-excelant.exec .../build/jacoco-main.exec .../build/jacoco-ooxml-lite.exec
[JaCoCo plugin] Saving matched class directories:  .../build/examples-classes .../build/excelant-classes .../build/excelant-test-classes 
[JaCoCo plugin] Saving matched source directories:  .../src/contrib/src .../src/examples/src .../src/excelant/java .../src/java
[JaCoCo plugin] Loading inclusions files..
[JaCoCo plugin] inclusions: []
[JaCoCo plugin] exclusions: [**/Test*]
[JaCoCo plugin] Thresholds: JacocoHealthReportThresholds [minClass=0, maxClass=0, minMethod=0, maxMethod=0, minLine=0, maxLine=0, 
minBranch=0, maxBranch=0, minInstruction=0, maxInstruction=0, minComplexity=0, maxComplexity=0]
[JaCoCo plugin] Publishing the results..
[JaCoCo plugin] Loading packages..
[JaCoCo plugin] Done.
Look at results

If data gathering is successful, the build will include a link to the coverage results similar to the HTML report of
JaCoCo itself. The job page will be enhanced with a chart with the trend of code coverage over the last builds.

Coverage column

This part of the JaCoCo plugin allows you to add a new type of column to a project-table in the Dashboard view which
will show the coverage number of the last build for ajob together with some color coding which allows to quickly see
projects with low coverage.

The fill-color in use by the column is a continuous color-range with the following points:

  • PERFECT = 100.0
  • EXCELLENT at 97.0
  • GOOD at 92.0
  • SUFFICIENT at 85.0
  • FAIR at 75.0
  • POOR at 50.0
  • TRAGIC at 25.0
  • ABYSSMAL at 0.0
  • NA = No coverage configured

Open Tickets (bugs and feature requests)

Build Status

Change Log

Version 1.0.20-SNAPSHOT (unreleased)

  •  

Version 1.0.19

  • Update used version of JaCoCo to 0.7.4

Version 1.0.18 (Dec 7, 2014)

  • Fix JENKINS-23708 NullPointerException if older JaCoCo reports are opened

Version 1.0.17 (Nov 25, 2014)

Version 1.0.16 (Jun 24, 2014)

Version 1.0.15 (Jun 11, 2014)

Version 1.0.14 (Nov 9, 2013)

Core JaCoCo plugin

Version 1.0.13 (Aug 22, 2013)

Core JaCoCo plugin

Coverage column:

Version 1.0.12 (Feb 22, 2013)

Version 1.0.11 (Feb 21, 2013)

Version 1.0.10 (Feb 05, 2013)

Version 1.0.9 (Nov 18, 2012) 

Version 1.0.8 (Okt 15, 2012) 

Version 1.0.7 (Okt 8, 2012) 

Version 1.0.6 (Okt 2, 2012) 

Version 1.0.5 (Sep 09, 2012) 

  • Fixed JENKINS-15088: When the missed count is bigger than the covered, the redbar becomes too long

Version 1.0.4 (Sep 03, 2012) 

  • Fixed JENKINS-14896: java.io.FileNotFoundException when saving module data

Version 1.0.3 (Aug 20, 2012) 

  • New concept implemented JENKINS-14927: Use the EXEC files instead the XMLs
  • Fixed JENKINS-14279: Report "missed items" rather that coverage percentage
  • Fixed JENKINS-14159: 404 when trying to see coverage on java code (implementation of sourcefile highlighting)
  • New feature JENKINS-14274: Multi module reporting

Version 1.0.2 (Jul 01, 2012) 

  • Fixed JENKINS-14270: The report does not show the covered/all, it shows something different

Version 1.0.1 (Jun 25, 2012) 

  • Fixed testcases to have all the tests passed for a release
  • Fixed JENKINS-14203: The total summary is double counted

Version 1.0.0 (Jun 14, 2012) 

  • Fixed 3 testcases to have all the tests passed for a release
  • Fixed POM: making it releasabl

Labels

Edit
plugin-report plugin-report Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Add Comment