From: Matt K. <mat...@gt...> - 2005-08-25 15:41:32
|
Hello, Sorry for the frequent emails, but I'm new to Cobertura. I've gotten cobertura to work to generate coverage reports, but those reports contain the actual test classes, not just the classes that are being tested. I was wondering if there is any way to exclude those classes from the report? <target name="coverage-reports" depends="compile-all,prepare" description="Generate unit test coverage reports."> <echo message="Coverage Datafile = ${coverage.datafile}" /> <cobertura-instrument datafile="${coverage.datafile}" todir="${instrumented.classes.dir}"> <fileset dir="${classes.dir}"> <exclude name="**/*Test.class" /> <include name="**/*.class" /> </fileset> </cobertura-instrument> <!-- Write our own JUnit task so that its settings work with cobertura. --> <junit fork="yes"> <sysproperty key="net.sourceforge.cobertura.datafile" value="${coverage.datafile}" /> <classpath location="${instrumented.classes.dir}" /> <classpath refid="application.classpath" /> <formatter type="brief" usefile="false" /> <batchtest> <fileset dir="${instrumented.classes.dir}"> <include name="**/*Test.class" /> </fileset> </batchtest> </junit> <cobertura-report srcdir="${src.dir}" destdir="${coverage.report.dir}" datafile="${coverage.datafile}" /> </target> TIA, Matt Kurjanowicz |