I want to add jacoco coverge for selenium functional test cases using ANT
Our selenium scripts are bundled as an executable jar. So, I have added
<jacoco:coverage> for <java.../> as below. I get a report but it shows 0%
coverage. The selenium functional scripts run on a tomcat URL which is
configured using properties and added to jar classpath.
Can someone help me out in getting the correct coverage.
<target name="run_selenium">
<jacoco:coverage>
<java jar="${myapp.dir}/seleniumscripts.jar" dir="${myapp.dir}/target" fork
= "true" failonerror="true" maxmemory="256m">
<jvmarg
line="-DjacocoArgs=-javaagent:${jacoco.home}/lib/jacocoagent.jar=destfile=${myapp.dir}/target/jacoco.exec"/>
</java>
</jacoco:coverage>
<jacoco:merge destfile="${myapp.dir}/target/merged.exec">
<fileset dir="${myapp.dir}/target" includes="jacoco.exec" />
</jacoco:merge>
<jacoco:report>
<executiondata>
<file file="${myapp.dir}/target/merged.exec" />
</executiondata>
<structure name="PivotMDAP">
<group name="myapp">
<classfiles>
<fileset dir="${myapp.dir}/classes"/>
</classfiles>
<sourcefiles encoding="UTF-8">
<fileset dir="${myapp.dir}/source"/>
</sourcefiles>
</group>
</structure>
<html destdir="${myapp.dir}/target/output" />
</jacoco:report>
</target>
--
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/57d3d6e1-96d2-460d-ae2c-c305847c82ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.