This plugin provides the ability to generate Camel route coverage reports as HTML and as Excel-compatible .xlsx files.
The plugin works in conjunction with the Camel Report Maven Plugin. The Camel Report Maven Plugin generates the XML files that are then converted to HTML and .xlsx files by this plugin.
The following example shows how to add the plugin to your Camel project.
<project>
...
<build>
<!-- To define the plugin version in your parent POM -->
<pluginManagement>
<plugins>
<plugin>
<groupId>io.github.cziesman</groupId>
<artifactId>camel-route-coverage-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
</plugin>
...
</plugins>
</pluginManagement>
<!-- To use the plugin goals in your POM or parent POM -->
<plugins>
<plugin>
<groupId>io.github.cziesman</groupId>
<artifactId>camel-route-coverage-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
</plugin>
...
</plugins>
</build>
...
</project>
The plugin will execute automatically as part of the test
phase, if configured as follows:
<plugin>
<groupId>io.github.cziesman</groupId>
<artifactId>camel-route-coverage-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
The plugin can be run manually using the following command:
mvn camel-route-coverage:report
The report files will be generated in the folder target/route-coverage-report
.
If a different output folder is preferred, add the following to the plugin definition:
<configuration>
<outputPath>/tmp/route-coverage-report</outputPath>
</configuration>