Hi,
Can someone please provide me with an example as to how to use the instrument 
task? Offline instrumentation seems to be the only workaround to the 
persistence framework being used. 

What I've done:

<jacoco:instrument destdir="${dest.dir}">
        <fileset dir="D:/NEON/HW/!!/bin" includes="**/*.class"/>
</jacoco:instrument>

Does the location of the instrumented classes(dest.dir) need to be included in 
both the coverage task and report creation task or only one of them?

<target name="cov-test" depends="jar">
     <mkdir dir="${report.dir}"/>       
     <jacoco:coverage>
        <junit fork="true" forkmode="once" showoutput="true" printsummary="on" 
enabletestlistenerevents="true">

           <test name="com.!!.DocumakerJunit"/> 
           <classpath>
            <path refid="ALL.jars"/>  
            <path refid="classpath"/>
            <pathelement location="C:/JUnit/JARS/2017-06-21/config/"/>
            <pathelement location="C:/JUnit/apache-ant-1.10.1/InstrClasses"/>   
   <-- LOCATION OF INSTRUMENTED CLASSES
           </classpath> 
        </junit>
    </jacoco:coverage>
</target>

        
<target name="cov-report" depends="cov-test">
        <jacoco:report>
                <executiondata>
                        <fileset file="jacoco.exec" />
                </executiondata>
        <structure name="Test">
                <classfiles>
                        <!-- DOES THE LOCATION OF THE INSTRUMENTED CLASSES BE 
MENTIONED HERE OR LOCATION OF ORIGINAL CLASS FILES??-->
                </classfiles>
                <!--<sourcefiles>
                                         
                </sourcefiles>-->                       
        </structure>
        <csv destfile="${report.dir}/report.csv" />
        </jacoco:report>

</target>

http://www.jacoco.org/jacoco/trunk/doc/offline.html
I read this page but I'm not entirely clear on where the jacocoagent.jar must 
be specified with respect to the coverage and report generation tasks and where 
the instrumented / original classes must be used.

Any additions to the code mentioned above are most welcome and very much 
appreciated. Thanks.

-- 
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/7b49d4da-b8b8-4e93-b3b0-c64bb46645f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to