Hi, We have integrated jacoco with our ant project and code coverage report 
is not generated for the classes in which we have used 
@RunWith(PowerMockRunner.class) (Powermock-mockito-1.5-full.jar)

Request you to refer the below mentioned build.xml configuration details :

Please inform is there any changes which we need to do in build.xml file or 
need to do changes in our junit test files.

<!-- jacoco -->

<taskdef uri="org.jacoco.ant" resource="org/jacoco/ant/antlib.xml">

        <classpath path=


<target name="unit_test" depends="unit_test_compile"

        description="Run junit tests">

    <jacoco:coverage destfile="${coverage.dir}/jacoco.exec" xmlns:jacoco=

<junit fork="yes" forkmode="perBatch" haltonfailure="yes" printsummary=

<classpath refid="unit.test.classpath" />  <!-- classpath contains nessary 
jar files for junit and powermockito -->

<formatter type="xml"/>

<batchtest fork="yes" todir="${unit.test.reports}">

<fileset dir="${unit.test.src}">

<include name="**/*Test*.java"/>

<exclude name="**/AllTests.java"/>

<exclude name="**/TestHelpers.java"/>






<target name="coverage-report" depends="unit_test">

<jacoco:report xmlns:jacoco="org.jacoco.ant">


            <file file="${coverage.dir}/jacoco.exec" />


        <structure name="Jacoco">


                <fileset dir="${bin}" />


            <sourcefiles encoding="UTF-8">

                <fileset dir="${src}" />



        <html destdir="${coverage.report.dir}" />



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 jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to