RE: Possible to use with Cobertura?
"Bret Kumler" <[email protected]>
| Newsgroups | gmane.comp.jakarta.cactus.user |
|---|---|
| Message-ID | <24F7E976D2C85149A4785E11309B603303F0A5C8@traveler> |
<!-- Prepare the classes for instrumentation -->
<target name="instrument" depends="compile" description="Add
Cobertura instrumentation">
<!-- instrument the application classes, writing the
instrumented classes into ${instrumented.classes}.-->
<cobertura-instrument datafile="${test.dir}/cobertura.ser"
todir="${instrumented.classes}">
<ignore regex="org.apache.log4j.*"/>
<fileset dir="${classes.dir}">
<include name="**/*.class"/>
<exclude name="**/*Test.class"/>
</fileset>
</cobertura-instrument>
</target>
Make sure u put the instrumented classes in the war file.
Also
<target name="test" depends="prepare.test" description="Run the tests on
the defined container">
<mkdir dir="${test.results}/cactus"/>
<cactus warfile="${test-war.dir}/${app.name}-${app.version}.war"
fork="yes"
failureproperty="tests.failed" haltonerror="false">
<!-- Configure the cactus task for logging -->
<cactusproperty server="false"
propertiesFile="${meta.dir}/${configtype}/test/logging_client.properties
"/>
<cactusproperty server="true"
propertiesFile="${meta.dir}/${configtype}/test/logging_server.properties
"/>
<!-- Additional jars that will be added to the classpath
used to start the
container (in addition to the container jars themseleves
which are
automatically added by the <cactus> task
-->
<containerclasspath>
<pathelement path="${test-props.dir}"/>
</containerclasspath>
<classpath>
<pathelement path="${instrumented.classes}"/>
<pathelement path="${classes.dir}"/>
<pathelement location="${test-lib.dir}/veridata-tests.jar"/>
<path refid="test-compile.libs.path"/>
</classpath>
<containerset>
<tomcat4x if="tomcat-dist.dir"
dir="${tomcat-dist.dir}" port="${test.port}"
output="${test.results}/cactus.out"
todir="${test.results}/cactus"
tmpdir="${test.temp.dir}"
jvmArgs="${gg.home}
-Dnet.sourceforge.cobertura.datafile=${test.dir}/cobertura.ser/>
</containerset>
<formatter type="brief" usefile="false"/>
<formatter type="xml"/>
<batchtest>
<fileset dir="${test-classes.dir}">
<include name="**/TestAll*.class"/>
</fileset>
</batchtest>
</cactus>
<!-- Generate the JUnit reports -->
<junitreport todir="${test.results}/cactus">
<fileset dir="${test.results}/cactus"
includes="TEST-*.xml"/>
<report todir="${test.results}/cactus"
format="frames"/>
</junitreport>
</target>
<!-- Generate the cobertura reports -->
<target name="coverage" depends= "test" description="HTML coverage
reports can be found in build/coverage">
<mkdir dir="${test.results}/coverage"/>
<cobertura-report srcdir="${src.dir}"
destdir="${test.results}/coverage/"
datafile="${test.dir}/cobertura.ser"/>
<echo>
Cobertura reports have been generated.
The HTML report is ${test.results}/coverage/index.html
</echo>
</target>
-----Original Message-----
From: news [mailto:[email protected]] On Behalf Of Ryan
Sent: Monday, May 01, 2006 9:27 AM
To: [email protected]
Subject: Possible to use with Cobertura?
Is it possible to use Cobertura with Cactus?
If so...does anyone have a sample of their build.xml file that I can
look at?
Can't seem to find the issue behind my problem...
Thanks,
Ryan
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
This e-mail message and any attachments may contain private, confidential, proprietary or privileged material of GoldenGate Software, Inc. that is for the sole use of the intended recipient(s) of this e-mail message. Any review, copying or distribution or other use of this e-mail message or any attachments hereto by anyone other than the intended recipient(s) is strictly prohibited. If you are not the intended recipient(s) of this e-mail message, please contact GoldenGate Software, Inc. (415-777-0200) immediately and permanently delete the original e-mail message and any copies of this e-mail message and all attachments, if any.