Go to file
2021-01-28 12:51:44 +03:00
image Provide better readme 2021-01-28 12:51:44 +03:00
script Provide better readme 2021-01-28 12:51:44 +03:00
.gitignore Provide gitignore, license and readme 2021-01-28 12:13:16 +03:00
LICENSE Provide gitignore, license and readme 2021-01-28 12:13:16 +03:00
README.md Provide better readme 2021-01-28 12:51:44 +03:00

test-coverage-analysis-script

Groovy script to print test coverage analysis results from jacoco report to the console.

Intended use:

Add jacoco-maven-plugin and groovy-maven-plugin to your pom file:

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

    <plugin>
        <groupId>org.codehaus.gmaven</groupId>
        <artifactId>groovy-maven-plugin</artifactId>
        <version>2.1.1</version>
        <executions>
            <execution>
                <phase>test</phase>
                <goals>
                    <goal>execute</goal>
                </goals>
                <configuration>
                    <source>
                        https://raw.githubusercontent.com/rbkmoney/test-coverage-analysis-script/master/script/TestCoverageAnalysis.groovy
                    </source>
                </configuration>
            </execution>
        </executions>
    </plugin>
</plugins>

Enjoy:

example.png