Actually I trying to make a jacoco Report of a specific test file but i am
getting the error which is specified in the attachement.I cannot do
fork="no" because somehow it will not generate my report and I also removed
all the System.exit code from my code base but the same error exist.So
somebody please help me out.
Build.xml:
<target name="jacocoTests" depends="buildServerTests" description="run
tests with jacoco" >
<record name="build.log" loglevel="verbose" append="false"/>
<taskdef uri="antlib:org.jacoco.ant"
resource="org/jacoco/ant/antlib.xml">
<classpath path="lib/jacocoant.jar"/>
</taskdef>
<jacocoTestsParameterized
targetClassDir="${SELECTED_TEST_CLASS_DIRECTORY}"
classFilterInclude="${SELECTED_TEST_CLASS_NAME}"
classFilterExclude="${SELECTED_TEST_CLASS_EXCLUDE_NAME}" />
</target>
<macrodef name="jacocoTestsParameterized" description="execute Jacoco with
parameters" >
<attribute name="targetClassDir" default="ServerTests"
description="directory of classes for junit execution" />
<attribute name="classFilterInclude" default="**/*"
description="class filter for include" />
<attribute name="classFilterExclude" default="**/*$*class"
description="class filter for exclude" />
<sequential>
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml">
<classpath path="lib/jacocoant.jar"/>
</taskdef>
<jacoco:instrument
destdir="${result.classes.instr.dir}/${SELECTED_TEST_CLASS_DIRECTORY}">
<fileset dir="${SELECTED_TEST_CLASS_DIRECTORY}">
<filename regex=".class"/>
</fileset>
</jacoco:instrument>
<path id="classpath">
<pathelement location="lib/junit-4.12.jar" />
<pathelement location="lib/hamcrest-core-1.3.jar" />
<pathelement location="lib/ant-junit4.jar"/>
<pathelement location="./ServerTests/build/manual/classes"/>
<fileset dir="./lib">
<include name="**/*.jar" />
</fileset>
</path>
<property name="junitReports" value="target/reports"/>
<mkdir dir="${junitReports}"/>
<echo message="hello"/>
<delete dir="./target/reports"/>
<delete dir="./target/site/jacoco"/>
<mkdir dir="./target/reports"/>
<mkdir dir="./target/site/jacoco"/>
<jacoco:coverage destfile="${result.exec.file}">
<junit haltonfailure="false" showoutput="yes" printsummary="yes"
fork="yes" forkmode="once" jvm="${openjdk.dir}/jre/bin/java"
includeantruntime="false">
<jvmarg value="-Xmx4096m"/>
<jvmarg value="-Xms2048m"/>
<jvmarg value="-XX:MaxPermSize=512m"/>
<jvmarg value="-DdisableMimicker=${disableMimicker}"/>
<formatter type="xml"/>
<classpath refid="classpath"/>
<classpath refid="defaultTESTpath"/>
<classpath location="./ServerTests/build/manual/classes"/>
<batchtest todir="${testreport.dir}">
<fileset dir="ServerTests/build/manual/classes">
<include name="com/hp/TestTestHelper.class"/>
<exclude name="**/*$*class"/>
</fileset>
</batchtest>
</junit>
</jacoco:coverage>
<junitreport todir="${testreport.dir}">
<fileset dir="${testreport.dir}">
<include name="TEST-*.xml" />
</fileset>
<report todir="${testreport.dir}"/>
</junitreport>
<jacoco:report>
<executiondata>
<fileset file="${result.exec.file}" />
</executiondata>
<structure name="com.hp.ssmc.pianoui.RemoteCopy.VerifyTest">
<classfiles>
<fileset dir="ServerTests/build/manual/classes"/>
</classfiles>
<sourcefiles encoding="UTF-8">
<fileset dir="ServerTests/manual"/>
</sourcefiles>
</structure>
<html destdir="${result.report.dir}/report.html"/>
<csv destfile="${result.report.dir}/report.csv"/>
<xml destfile="${result.report.dir}/report.xml"/>
</jacoco:report>
</sequential>
</macrodef>
--
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/4a93ccb4-815e-4b81-8b79-2e82bedba049%40googlegroups.com.