jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ranganathan, Shobana" <SRanganat...@DIRECTV.com>
Subject getting code coverage using runservertests
Date Wed, 31 Mar 2010 15:29:14 GMT
Hi,


How can I get code coverage using runservertests if I run my test against a cobertura instrumented
class? What I have below does not work. A browser is opened and the test case executes fine
but I do not get any coverage.


<runservertests

    testurl="http://localhost:${test.port}/test/ServletRedirector?Cactus_Service=RUN_TEST"

    starttarget="start.tomcat.40"

    stoptarget="stop.tomcat.40"

    testtarget="test"/>


<target name="test">
        <exec executable="${browser}" spawn="true">
          <arg value="${cactus.url}/ServletTestRunner?suite=com.xyz.TestBroadbandMgr"/>
        </exec>
        <antcall target="coveragetest" />

  </target>

      <target name="coveragetest">
            <cobertura-report srcdir="src"
            destdir="${reports.cobertura.dir}"
            datafile="${basedir}/cobertura.ser"/>
            <echo>
                    Cobertura reports have been generated.
                    The HTML report is ${reports.cobertura.dir}/index.html
                </echo>

        </target>




Regards,
Shobana


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message