Hi Manas,
It is nt emma eror that i get , but it says classnotfound exception for any
class it executes in the junit section
<target name="emma-coverage" description="generates emma coverage report">
<mkdir dir="${instrumented.dir}"/>
<emma enabled="true">
<instr instrpathref="emma.coverage.classes"
destdir="${instrumented.dir}"
metadatafile="${coverage.dir}/metadata.emma"
merge="true">
<filter value="${emma.filter}" />
</instr>
</emma>
<mkdir dir="/opt/hybris/bin/rules/junit" />
<junit printsummary="no" haltonfailure="no" fork="true"
failureproperty="tests.failed" errorproperty="tests.failed">
<classpath>
<pathelement location="${instrumented.dir}" />
<pathelement
location="/opt/hybris/bin/platform/apache-ant-1.8.1/lib/junit-4.9b2.jar" />
<pathelement
location="/opt/hybris/bin/platform/apache-ant-1.8.1/lib/emma-2.1.5320/emma.jar"
/>
<pathelement
location="/opt/hybris/bin/platform/apache-ant-1.8.1/lib/emma-2.1.5320/emma_ant.jar"
/>
<path refid="emma.lib" />
</classpath>
<formatter usefile="false" type="brief" />
<formatter type="plain"/>
<batchtest fork="yes" todir="/opt/hybris/bin/rules/junit">
<fileset dir="${instrumented.dir}" includes="**/*.class"/>
</batchtest>
<jvmarg
value="-Demma.coverage.out.file=/opt/hybris/bin/rules/emma/coverage.emma"/>
<jvmarg value="-Demma.coverage.out.merge=false" />
</junit>
<emma enabled="true" >
<report sourcepath="/opt/hybris/bin/custom" >
<fileset dir="/opt/hybris/bin/rules/emma" >
<include name="*.emma" />
</fileset>
<xml outfile="/opt/hybris/bin/rules/emma/coverage.xml"
depth="package"
/>
</report>
</emma>
</target>
Thanks,
Lis
On Tue, Mar 15, 2011 at 3:15 PM, Manas Panda <[email protected]> wrote:
> Is it EMMA class not found error ? If yes then add emma.jar to the class
> path while running your Junit cases .
>
> HTH
>
> On Tue, Mar 15, 2011 at 11:07 AM, Lis Maria <[email protected]> wrote:
>
> > Hello..
> >
> > I am trying to add emma configurations into my Hybris ant build scripts.
> > The
> > issue i face is, the junit that runs on the instrumented classes fails,
> > because of which i do not think the report emma generates is correct.
> ant
> > version is 1.8 and emma version is 2.1. The junit jar i use is of
> > version4.9
> >
> > 'Class not found exception' is what junits throws when they run on the
> > instrumented class files . Any help much appreciated.
> >
> > Thanks,
> > Lis Thomas
> >
>