Offline instrumentation

36 views
Skip to first unread message

sharm...@gmail.com

unread,
Nov 4, 2016, 6:20:59 AM11/4/16
to JaCoCo and EclEmma Users
I am trying to estimate code coverage for system test. I did mvn clean test and got the classes instrumented . when I run tests ,I am not able to see the jacoco reports anywhere . What is the issue ?
attached the jacoco plugin spec in pom.xml

<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.5.201505241946</version>
<executions>
<execution>
<id>jacoco-initialize</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<destFile>
${project.build.directory}/coverage-reports/jacoco-ut.exec
</destFile>
<excludes>
<exclude>**/lib/*</exclude>
</excludes>
</configuration>
</execution>
<execution>
<id>jacoco-report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<dataFile>
${project.build.directory}/coverage-reports/jacoco-ut.exec
</dataFile>
<outputDirectory>/jacoco-ut</outputDirectory>
<excludes>
<exclude>**/lib/*</exclude>
</excludes>
</configuration>
</execution>
<execution>
<id>jacoco-instrument</id>
<phase>test</phase>
<goals>
<goal>instrument</goal>
</goals>
<configuration>
<outputDirectory>/tmp/jacoco-ut</outputDirectory>
<excludes>
<exclude>**/lib/*</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>

Evgeny Mandrikov

unread,
Nov 4, 2016, 6:46:41 AM11/4/16
to JaCoCo and EclEmma Users, sharm...@gmail.com

  1. Why not provide build log? Maybe it contains some error messages?
  2. Do not mix on-the-fly instrumentation "prepare-agent" with pre-instrumentation (offline) "instrument".
  3. If you are on Linux, then "/jacoco-ut" most likely refers to non-writable location.
  4. Did you tried to study example that we provide in documentation - http://www.eclemma.org/jacoco/trunk/doc/examples/build/pom.xml ? You'll find it fully in attachment - unpack, run "mvn package", study together with documentation, apply learned materials on your project.

jacoco-example.zip
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages