The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

JaCoCo plugin

jacoco: Record JaCoCo coverage report

Allows to configure various aspects of the JaCoCo code coverage report. The paths define where the various types of files can be found in the workspace, inclusions and exclusions allow to exclude certain class files. And the coverage thresholds allow to configure how much coverage is necessary to make the build green (if changing the build status is enabled).
  • buildOverBuild : boolean (optional)
    Check this to set the build status to failure if the delta coverage thresholds are violated. Delta coverage is the difference between coverage of last successful and current build.
  • changeBuildStatus : boolean (optional)
    Check this to set the build status to unstable if coverage thresholds are violated.
  • classPattern : String (optional)
    Path to the Java class directories that should be included in coverage reporting. Ant path wildcards are understood.
  • deltaBranchCoverage : String (optional)
    Change build status if coverage degrades. The build status degrades to unstable (or failed) if branch coverage decreases by more than this delta threshold compared to the previous build.
  • deltaClassCoverage : String (optional)
    Change build status if coverage degrades. The build status degrades to unstable (or failed) if class coverage decreases by more than this delta threshold compared to the previous build.
  • deltaComplexityCoverage : String (optional)
    Change build status if coverage degrades. The build status degrades to unstable (or failed) if complexity coverage decreases by more than this delta threshold compared to the previous build.
  • deltaInstructionCoverage : String (optional)
    Change build status if coverage degrades. The build status degrades to unstable (or failed) if instruction coverage decreases by more than this delta threshold compared to the previous build.
  • deltaLineCoverage : String (optional)
    Change build status if coverage degrades. The build status degrades to unstable (or failed) if line coverage decreases by more than this delta threshold compared to the previous build.
  • deltaMethodCoverage : String (optional)
    Change build status if coverage degrades. The build status degrades to unstable (or failed) if method coverage decreases by more than this delta threshold compared to the previous build.
  • exclusionPattern : String (optional)
    Path to the Java class files that should be excluded from coverage reporting. Ant path wildcards are understood.
  • execPattern : String (optional)
    Path to the exec files generated by JaCoCo. Ant path wildcards are understood.
  • inclusionPattern : String (optional)
    Path to the Java class files that should be included in coverage reporting. Ant path wildcards are understood.
  • maximumBranchCoverage : String (optional)
    Change build status based on coverage results.
    • The build fails if the branch coverage is below minimumBranchCoverage
    • The build is unstable if the branch coverage is above minimumBranchCoverage and below maximumBranchCoverage
    • The build succeeds if the branch coverage is above maximumBranchCoverage
  • maximumClassCoverage : String (optional)
    Change build status based on coverage results.
    • The build fails if the class coverage is below minimumClassCoverage
    • The build is unstable if the class coverage is above minimumClassCoverage and below maximumClassCoverage
    • The build succeeds if the class coverage is above maximumClassCoverage
  • maximumComplexityCoverage : String (optional)
    Change build status based on coverage results.
    • The build fails if the complexity coverage is below minimumComplexityCoverage
    • The build is unstable if the complexity coverage is above minimumComplexityCoverage and below maximumComplexityCoverage
    • The build succeeds if the complexity coverage is above maximumComplexityCoverage
  • maximumInstructionCoverage : String (optional)
    Change build status based on coverage results.
    • The build fails if the instruction coverage is below minimumInstructionCoverage
    • The build is unstable if the instruction coverage is above minimumInstructionCoverage and below maximumInstructionCoverage
    • The build succeeds if the instruction coverage is above maximumInstructionCoverage
  • maximumLineCoverage : String (optional)
    Change build status based on coverage results.
    • The build fails if the line coverage is below minimumLineCoverage
    • The build is unstable if the line coverage is above minimumLineCoverage and below maximumLineCoverage
    • The build succeeds if the line coverage is above maximumLineCoverage
  • maximumMethodCoverage : String (optional)
    Change build status based on coverage results.
    • The build fails if the method coverage is below minimumMethodCoverage
    • The build is unstable if the method coverage is above minimumMethodCoverage and below maximumMethodCoverage
    • The build succeeds if the method coverage is above maximumMethodCoverage
  • minimumBranchCoverage : String (optional)
    Change build status based on coverage results.
    • The build fails if the branch coverage is below minimumBranchCoverage
    • The build is unstable if the branch coverage is above minimumBranchCoverage and below maximumBranchCoverage
    • The build succeeds if the branch coverage is above maximumBranchCoverage
  • minimumClassCoverage : String (optional)
    Change build status based on coverage results.
    • The build fails if the class coverage is below minimumClassCoverage
    • The build is unstable if the class coverage is above minimumClassCoverage and below maximumClassCoverage
    • The build succeeds if the class coverage is above maximumClassCoverage
  • minimumComplexityCoverage : String (optional)
    Change build status based on coverage results.
    • The build fails if the complexity coverage is below minimumComplexityCoverage
    • The build is unstable if the complexity coverage is above minimumComplexityCoverage and below maximumComplexityCoverage
    • The build succeeds if the complexity coverage is above maximumComplexityCoverage
  • minimumInstructionCoverage : String (optional)
    Change build status based on coverage results.
    • The build fails if the instruction coverage is below minimumInstructionCoverage
    • The build is unstable if the instruction coverage is above minimumInstructionCoverage and below maximumInstructionCoverage
    • The build succeeds if the instruction coverage is above maximumInstructionCoverage
  • minimumLineCoverage : String (optional)
    Change build status based on coverage results.
    • The build fails if the line coverage is below minimumLineCoverage
    • The build is unstable if the line coverage is above minimumLineCoverage and below maximumLineCoverage
    • The build succeeds if the line coverage is above maximumLineCoverage
  • minimumMethodCoverage : String (optional)
    Change build status based on coverage results.
    • The build fails if the method coverage is below minimumMethodCoverage
    • The build is unstable if the method coverage is above minimumMethodCoverage and below maximumMethodCoverage
    • The build succeeds if the method coverage is above maximumMethodCoverage
  • runAlways : boolean (optional)
    Run coverage collection even if the build fails or is aborted.
  • skipCopyOfSrcFiles : boolean (optional)
    Check this to disable display of source files for each line coverage
  • sourceExclusionPattern : String (optional)
    Path to the Java source files that should be excluded from coverage reporting. Ant path wildcards are understood.
  • sourceInclusionPattern : String (optional)
    Path to the Java source files that should be included in coverage reporting. Ant path wildcards are understood.
  • sourcePattern : String (optional)
    Path to the Java source directories that should be included in coverage reporting. Ant path wildcards are understood.

Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

    


See existing feedback here.