Hi,
looks like we have several issues here. Let's start with the JUnit test
failure. Can you please provide
1) Exact version of JaCoCo you're using
2) Full JDK version (java -version)
3) Full stack trace of failure
Thanks,
-marc
On 2015-10-01 16:57, [email protected] wrote:
Hi All,
I am running code coverage using Jacoco, and getting error "Unable
to read execution data file - reports\jacoco.exec"
OS - Windows7
JDK - 1.6 / (I tried with JDK 1.7 as well)
Jacoco - latest Jars
Below is the task definition
<jacoco:coverage destfile="reports/jacoco.exec"
exclclassloader="javassist.Loader">
<junit printsummary="yes" haltonfailure="yes" fork="yes"
showoutput="yes">
<formatter type="xml"/>
<classpath>
<pathelement location="${test.classes.dir}"/>
<pathelement
location="${target.classes.dir}"/>
<pathelement
location="C:\kedar\work\CodeCoverage\DF1073Base\target\classes"/>
<fileset dir="${slib.dir}">
<include name="**/*.jar" />
</fileset>
</classpath>
<batchtest fork="no" todir="reports">
<fileset dir="test">
<include name="**/*Test*.java"/>
</fileset>
</batchtest>
</junit>
</jacoco:coverage>
<jacoco:report>
<executiondata>
<file file="reports/jacoco.exec"/>
</executiondata>
<structure name="JaCoCo Ant Example">
<classfiles>
<fileset dir="${test.classes.dir}"/>
</classfiles>
<sourcefiles encoding="UTF-8">
<fileset dir="src"/>
</sourcefiles>
</structure>
<html destdir="reports"/>
<csv destfile="reports/report.csv"/>
<xml destfile="reports/report.xml"/>
</jacoco:report>
</target>
If I keep "batchtest fork="no"" - Jacoco executes the Test cases
successfully - But Does not generate jacoco.exec file. Can someone
help to identify - Why is not generating the jacoco.exec file?
If I keep "batchtest fork="yes/true"" - Jacoco generates jacoco.exec
file, but all the test cases fail saying "Class not found
sun/reflect/GeneratorAccessorMethod".
Please let me know if more information is required.
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jacoco/10841d88e8c95b8db29ea7b354e4ee0b%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.