Hi,

if classes are reported with 0% coverage and are listed on the Sessions page without a link this means that the classes used runtime are different from the classes supplied to the report goal/task. Make sure you use the exact same class files and no other Java agent modifies the classes when they get loaded.

Cheers,
-marc


On 2014-01-23 11:55, Henry M. wrote:
Hi.

I have the following maven project:

root
|-module1
|-module2

I want to run tests from root and have coverage report on both
modules.
I have configured the following:

<plugins>
 <plugin>
 <groupId>org.jacoco</groupId>
 <artifactId>jacoco-maven-plugin</artifactId>
 <version>${jacoco.version}</version>
 <executions>
 <execution>
 <id>jacoco-initialize</id>
 <goals>
 <goal>prepare-agent</goal>
 </goals>
 <configuration>
 <destFile>${jacoco.report.path}/${jacoco.report.filename}</destFile>
 <!--
 Sets the name of the property containing the settings
 for JaCoCo runtime agent.
 -->
 <propertyName>surefireArgLine</propertyName>
 <append>${jacoco.report.append}</append>
 </configuration>
 </execution>
 <execution>
 <id>jacoco-site</id>
 <phase>package</phase>
 <goals>
 <goal>report</goal>
 </goals>
 <configuration>
 <dataFile>${jacoco.report.path}/${jacoco.report.filename}</dataFile>
 <outputDirectory>${jacoco.output.site.path}</outputDirectory>
 </configuration>
 </execution>
 </executions>
 </plugin>
 </plugins>

But is seems that the report contains only the coverage info for the
last module run.
When clicking on sessions - I see the class files of the other module
(which is not in the report) but without links to the actual report on
those classes.

I also tried to extract classes/sources upfront and supply it to Ant
report task after I ran the tests separately, in different maven
command.
But then the result is that there is coverage report for all modules,
but all is 0% and red slide.

What is the best practice to achieve that?

Thanks,
Henry.

 --
 You received this message because you are subscribed to the Google
Groups "JaCoCo and EclEmma Users" group.
 To unsubscribe from this group and stop receiving emails from it,
send an email to [email protected].
 For more options, visit https://groups.google.com/groups/opt_out [1].


Links:
------
[1] https://groups.google.com/groups/opt_out

--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to