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/fd901cfd-dfa7-4fc8-b031-d2ec21993923%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to