maven - Trouble producing cobertura coverage -
maven - Trouble producing cobertura coverage -
my code contains tests , tests run fine upon mvn clean install
i have included cobertura prlugin in order produce reports as
<plugin> <groupid>org.codehaus.mojo</groupid> <artifactid>cobertura-maven-plugin</artifactid> <version>2.5.1</version> <configuration> <formats> <format>xml</format> <format>html</format> </formats> <check/> </configuration> <executions> <execution> <phase>clean</phase> <goals> <goal>cobertura</goal> </goals> </execution> </executions> </plugin>
at end, html produced in target
expected. index.html
shows classes , packages ... no coverage info (0% coverage all)
if export coverage via intellij
shows coverage appropriately. setup missing obvious?
please help me understand.
it looks problem you're trying execute cobertura
in clean
phase of project.
according documentation, cobertura uses own lifecycle: http://mojo.codehaus.org/cobertura-maven-plugin/cobertura-mojo.html
please remove <phase>clean</phase>
execution
configuration , seek again.
further references here:
how configure when cobertura tests run in maven-cobertura-plugin? http://mojo.codehaus.org/cobertura-maven-plugin/usage.html maven code-coverage cobertura
Comments
Post a Comment