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 (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.
    • Type: boolean
  • changeBuildStatus (optional)
    Check this to set the build status to unstable if coverage thresholds are violated.
    • Type: boolean
  • classPattern (optional)
    Path to the Java class directories that should be included in coverage reporting. Ant path wildcards are understood.
    • Type: String
  • deltaBranchCoverage (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.
    • Type: String
  • deltaClassCoverage (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.
    • Type: String
  • deltaComplexityCoverage (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.
    • Type: String
  • deltaInstructionCoverage (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.
    • Type: String
  • deltaLineCoverage (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.
    • Type: String
  • deltaMethodCoverage (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.
    • Type: String
  • exclusionPattern (optional)
    Path to the Java class files that should be excluded from coverage reporting. Ant path wildcards are understood.
    • Type: String
  • execPattern (optional)
    Path to the exec files generated by JaCoCo. Ant path wildcards are understood.
    • Type: String
  • inclusionPattern (optional)
    Path to the Java class files that should be included in coverage reporting. Ant path wildcards are understood.
    • Type: String
  • maximumBranchCoverage (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
    • Type: String
  • maximumClassCoverage (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
    • Type: String
  • maximumComplexityCoverage (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
    • Type: String
  • maximumInstructionCoverage (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
    • Type: String
  • maximumLineCoverage (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
    • Type: String
  • maximumMethodCoverage (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
    • Type: String
  • minimumBranchCoverage (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
    • Type: String
  • minimumClassCoverage (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
    • Type: String
  • minimumComplexityCoverage (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
    • Type: String
  • minimumInstructionCoverage (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
    • Type: String
  • minimumLineCoverage (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
    • Type: String
  • minimumMethodCoverage (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
    • Type: String
  • runAlways (optional)
    Run coverage collection even if the build fails or is aborted.
    • Type: boolean
  • skipCopyOfSrcFiles (optional)
    Check this to disable display of source files for each line coverage
    • Type: boolean
  • sourceExclusionPattern (optional)
    Path to the Java source files that should be excluded from coverage reporting. Ant path wildcards are understood.
    • Type: String
  • sourceInclusionPattern (optional)
    Path to the Java source files that should be included in coverage reporting. Ant path wildcards are understood.
    • Type: String
  • sourcePattern (optional)
    Path to the Java source directories that should be included in coverage reporting. Ant path wildcards are understood.
    • Type: String

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.