Skip to content

rguenthe/pipeline-coverage-results-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pipeline: Coverage Results Plugin

The plugin adds a pipeline step to access code coverage results.

Currently supported coverage providers:

Usage

The method getCoverageResult can be used to access code coverage results.

  • Parameter element: the coverage element: e.g. 'Line', 'Conditional' (depends on used coverage adapter)
  • Return: Integer value representing the coverage in percent (-1 if no coverage results were found)

If no parameter element is given it defaults to 'Line'.

Examples

These are examples for use with the code-coverage-api-plugin which provides 'Line' and 'Conditional' coverage elements for all adapters.

Line coverage

def lineCoverage = getCoverage('Line');

Branch coverage

def conditionCoverage = getCoverage('Conditional');

About

Access code coverage results in jenkins pipeline scripts

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages