From: John W. L. <Joh...@sa...> - 2012-03-27 21:55:18
|
That is determined by how you are doing the instrumentation. Can I see your call to cobertura-instrument? From: Emilio Corengia [mailto:emi...@ho...] Sent: Tuesday, March 27, 2012 5:44 PM To: cob...@li... Subject: [Cobertura-devel] Can't get the the proper code coverage using Cobertura + Testng + Ant Hi guys, I don't have too much experience with Cobertura.. I'm trying to build the coverage reports for a Web app (using Atlas) running my TestNG tests. The problem that I have is when I try to generate the coverage reports it always show coverage only for my tests instead of the actual host classes (coverage for the classes of Web App is always 0). I don't want to know the coverage of my tests, I want the coverage for the App classes. I'm running these tests like this bellow: <target name="run-instrumented-testng"> <property name="groups" value="" /> <property name="groups.exclude" value="" /> <testng classpathref="cob.test.path" outputDir="${dir.testng.reports}" haltonfailure="true" haltonskipped="false" groups="${groups}"> <xmlfileset dir="${dir.testng.conf}" includes="testng.xml" /> <sysproperty key="net.sourceforge.cobertura.datafile" file="${cob.ser.file}" /> <!-- ser file --> </testng> </target> With: <path id="cob.test.path"> <pathelement path="${instrumented.classes}"/> <!-- instrumentation directory --> <pathelement path="${dir.compile}"/> <!-- main class files --> <pathelement path="${dir.servicetest.compile}"/> <!-- test class files --> <path refid="classpath.testng"/> <path refid="classpath.cobertura"/> </path> Any idea about where I messed up here is welcome... thanks in advance, Emilio. |