The Wayback Machine - https://web.archive.org/web/20180730013049/https://github.com/jenkinsci/code-coverage-api-plugin
Skip to content
Jenkins Code Coverage API Plugin
Java JavaScript XSLT CSS
Switch branches/tags
Clone or download
cizezsy Merge pull request #34 from jenkinsci/changelog
add changelog for 1.0.0-rc-1 release
Latest commit 7dcde84 Jul 29, 2018

README.md

code-coverage-api-plugin

(This plugin is now under development)

This plugin serves as API to integrate and publish multiple coverage report types.

How to use it

Code Coverage API plugin now supports Cobertura and Jacoco.

Config maven to generate coverage reports.

For Cobertura

<build>
    <plugins>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>cobertura-maven-plugin</artifactId>
            <version>2.7</version>
            <configuration>
                <formats>
                    <format>xml</format>
                </formats>
                <check/>
            </configuration>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>cobertura</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

For Jacoco

<build>
    <plugins>
        <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>0.8.1</version>
            <executions>
                <execution>
                    <goals>
                        <goal>prepare-agent</goal>
                    </goals>
                </execution>
                <execution>
                    <id>report</id>
                    <phase>package</phase>
                    <goals>
                        <goal>report</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

Then plugin will automatically find reports (Only Support Cobertura now) according to your auto detect path.

Also, we can specify report path for each coverage tool.

For more details, see the Introduction Blogpost.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.