On Friday, 23 June 2017 20:12:30 UTC+5:30, Marc R. Hoffmann wrote:
> Please see our documentation for a detailled discussion of this issue:
>
> http://www.jacoco.org/jacoco/trunk/doc/classids.html
>
> Regards,
> -marc
>
> On 23.06.17 08:46, [email protected] wrote:
> > debug="true" in the compile task did the trick in this case. Thanks.
> >
> > I'm testing another project wherein I receive this warning during report
> > creation:
> >
> > [jacoco:report] Classes in bundle 'Test' do no match with execution data.
> > For report generation the same class files must be used as at runtime.
> > [jacoco:report] Execution data for class com/**/AccountDetails does not
> > match.
> >
> > and the same warning for 3 more classes resulting in partial coverage
> > details being copied to the report.
> >
> >
> > I googled it and found an answer on stack overflow suggesting that the
> > versions used to compile the classes and create the report might be
> > different.
> > I'm using a few external jars(Because of some dependencies). The .class
> > files within these jars might have been compiled on 1.8.0_101 and I'm using
> > 1.8.0_111
> >
> > Originally I had tried it with 1.8.0_101 itself but I received the same
> > error.
> > What might be the cause of this error?
> >
Hi Marc,
I've translated the code to fit the format of offline instrumentation from what
I could observe in the example you provided, but I'm still receiving the same
errors.
"[jacoco:report] Classes in bundle 'Test' do no match with execution data. For
report generation the same class files must be used as at runtime.
[jacoco:report] Execution data for class com/**/AccountDetails does not match."
<target name="instrument">
<jacoco:instrument destdir="${dest.dir}">
<fileset file="D:/NEON/HW/!!/projects-framework/module/!!/bin"
includes="**/*.class"/>
<fileset
file="D:/NEON/HW/!!/projects-framework/testprojects/!!/bin"
includes="**/*.class"/>
</jacoco:instrument>
</target>
<target name="cov-test" depends="instrument">
<mkdir dir="${report.dir}"/>
<jacoco:coverage>
<junit fork="true" forkmode="once" showoutput="true"
printsummary="on" enabletestlistenerevents="true">
<classpath>
<path refid="ALL.jars"/>
<path refid="classpath"/>
<pathelement
location="C:/JUnit/jacoco-0.7.9/lib/jacocoagent.jar"/>
<pathelement
location="C:/JUnit/JARS/2017-06-21/config/"/>
<pathelement
path="C:/JUnit/apache-ant-1.10.1/InstrClasses"/>
</classpath>
<sysproperty key="jacoco-agent.destfile" file="jacoco.exec"/>
<test name="com.!!.ABCJunit"/>
</junit>
</jacoco:coverage>
</target>
<target name="cov-report" depends="cov-test">
<jacoco:report>
<executiondata>
<file file="jacoco.exec" />
</executiondata>
<structure name="Test">
<classfiles>
<fileset dir="D:/NEON/HW/!!/bin"/>
<fileset dir="D:/NEON/HW/!!/bin"/>
</classfiles>
<sourcefiles>
<fileset dir="D:/NEON/HW/!!/src"/>
<fileset dir="D:/NEON/HW/!!/src"/>
</sourcefiles>
</structure>
<csv destfile="${report.dir}/report.csv" />
</jacoco:report>
</target>
I can't seem to find the bug. Please help point out anything wrong in the code?
What can be done to improve this?
Thanks Marc, for taking the time out to answer these questions. Really
appreciate it.
--
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/98f7c2f8-0385-4d3f-8c32-c016c52441bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.