Cobertura Plugin (quokka.plugin.cobertura:0.3, namespace=cobertura)

The Cobertura Plugin produces code coverage reports for unit and integration tests.

Main Targets

report Generates a code coverage report. Implements quokka.plugin.devreport:generate

Minor Targets

instrument Instruments the compiled classes to capture coverage data. Implements quokka.plugin.lifecycle:instrument-compiled
collect Collects coverage data for use in reporting. Implements quokka.plugin.devreport:generate
propogate Propogates coverage data to the parent project in multi-project builds. Implements quokka.plugin.devreport:generate
aggregate-report Generates a coverage reports for multiple projects. Implements quokka.plugin.devreport:generate

In general there is no need to configure the Cobertura plugin - it automatically binds itself to the relevant lifecycle and devreport targets. e.g. Add the plugin as follows:

<plugin group="quokka.plugin.cobertura" version="?"/>

It will then be automatically included in the developer reports when you do quokka reports. Alternatively, you can execute the cobertura report in isolation using quokka cobertura (an alias for cobertura:report).

Shared Default Properties

q.cobertura.instrument.dataFile ${q.project.targetDir}/cobertura.ser
q.junit.test.sysproperty[net.sourceforge.cobertura.datafile] ${q.cobertura.instrument.dataFile}
q.junit.itest.sysproperty[net.sourceforge.cobertura.datafile] ${q.cobertura.instrument.dataFile}

report

Generates a code coverage report

  • alias: cobertura
  • depends: collect
  • prefix: q.cobertura.report
  • Implements: quokka.plugin.devreport:generate

Default Properties

description Cobertura coverage report
destDir ${q.devreport.reportsRootDir}/cobertura
format html
indexFile ${prefix.destDir}/index.html
maxMemory ${@setifdef q.project.forkMaxMemory}
name Cobertura

instrument

Instruments the compiled classes to capture coverage data

  • prefix: q.cobertura.instrument
  • enabled-by-default: false
  • Implements: quokka.plugin.lifecycle:instrument-compiled

Default Properties

classes.set.dir ${q.lifecycle.compileOutput}
classes.set.includes **/*.class
dataFile ${q.project.targetDir}/cobertura.ser
maxMemory ${@setifdef q.project.forkMaxMemory}

collect

Collects coverage data for use in reporting

  • depends: instrument, lifecycle:integration-test
  • prefix: q.cobertura.collect
  • enabled-by-default: false
  • Implements: quokka.plugin.devreport:generate

Default Properties

aggregate true
propogate true
src.set.dir ${q.javac.main.srcDir}
src.set.includes **/*.java

propogate

Propogates coverage data to the parent project in multi-project builds

  • prefix: q.cobertura.propogate
  • enabled-by-default: false
  • Implements: quokka.plugin.devreport:generate

aggregate-report

Generates a coverage reports for multiple projects

  • prefix: q.cobertura.aggregate-report
  • enabled-by-default: false
  • Implements: quokka.plugin.devreport:generate

Default Properties

description Cobertura coverage report (aggregate)
destDir ${q.devreport.reportsRootDir}/cobertura-aggregate
format html
indexFile ${prefix.destDir}/index.html
maxMemory ${@setifdef q.project.forkMaxMemory}
mergedDataFile ${q.project.targetDir}/cobertura-merged.ser
name Cobertura

Plugin Paths

instrument : Path required for instrumenting classes

apache.oro oro 2.0.8

apache.log4j log4j 1.2.15

ow2.asm asm 2.2.1


coverage : Path required collecting coverage data while testing

sf.cobertura cobertura 1.8


runtime : Runtime class path

quokka.plugin.devreport devreport 0.3

quokka.core.plugin-spi plugin-spi 0.3

quokka.core.util util 0.3

apache.ant ant 1.7.1

quokka.core.bootstrap-util bootstrap-util 0.3

quokka.core.plugin-spi plugin-spi 0.3

quokka.plugin.lifecycle lifecycle 0.3

quokka.core.plugin-spi plugin-spi 0.3

apache.ant ant 1.7.1

quokka.core.bootstrap-util bootstrap-util 0.3

sf.cobertura cobertura 1.8

quokka.core.bootstrap-util bootstrap-util 0.3

apache.ant ant 1.7.1


report : Path required for generating the coverage report

apache.log4j log4j 1.2.15