Add coverage reporting

This commit is contained in:
Bradley Hilton 2017-01-04 11:26:56 -02:00
parent 9d5d56c192
commit f624518a0e
No known key found for this signature in database
GPG Key ID: 0666B2C24C43C358

34
pom.xml
View File

@ -45,7 +45,7 @@
<id>sk89q-repo</id> <id>sk89q-repo</id>
<url>http://maven.sk89q.com/repo/</url> <url>http://maven.sk89q.com/repo/</url>
</repository> </repository>
<repository> <repository>
<id>gray-snapshot</id> <id>gray-snapshot</id>
<url>https://repo.craftyn.com/repository/graywolf336-snapshots/</url> <url>https://repo.craftyn.com/repository/graywolf336-snapshots/</url>
@ -265,11 +265,43 @@
</executions> </executions>
</plugin> </plugin>
<!-- https://www.petrikainulainen.net/programming/maven/creating-code-coverage-reports-for-unit-and-integration-tests-with-the-jacoco-maven-plugin/ -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.8</version>
<executions>
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
<propertyName>surefireArgLine</propertyName>
</configuration>
</execution>
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
<outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>2.11</version> <version>2.11</version>
<configuration> <configuration>
<!-- Sets the VM argument line used when unit tests are run. -->
<argLine>${surefireArgLine}</argLine>
<parallel>methods</parallel> <parallel>methods</parallel>
<threadCount>10</threadCount> <threadCount>10</threadCount>
<excludes> <excludes>