File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 171171 <copy todir =" ${ build.dir } /test" >
172172 <fileset dir =" ${ test.dir } " excludes =" **/*.java" />
173173 </copy >
174+ <!-- Test coverage -->
175+ <taskdef classpathref =" test.classpath" resource =" tasks.properties" />
176+ <cobertura-instrument todir =" ${ build.dir } /instrumented"
177+ datafile =" ${ build.dir } /cobertura.ser" >
178+ <fileset dir =" ${ build.dir } /classes" >
179+ <include name =" **/*.class" />
180+ </fileset >
181+ </cobertura-instrument >
174182 </target >
175183
176184 <target name =" test" depends =" test-compile" description =" Run the unit tests." >
177185 <junit fork =" yes" >
178186 <classpath >
187+ <pathelement path =" ${ build.dir } /instrumented" />
179188 <pathelement path =" ${ build.dir } /classes" />
180189 <pathelement path =" ${ build.dir } /test" />
181190 <path refid =" test.classpath" />
182191 </classpath >
192+ <sysproperty key =" net.sourceforge.cobertura.datafile"
193+ file =" ${ build.dir } /cobertura.ser" />
183194 <batchtest >
184195 <formatter type =" brief" usefile =" false" />
185196 <fileset dir =" ${ build.dir } /test" />
186197 </batchtest >
187198 </junit >
199+ <cobertura-report srcdir =" ${ src.dir } " destdir =" ${ dist.dir } /test"
200+ datafile =" ${ build.dir } /cobertura.ser" />
188201 </target >
189202
190203 <!-- Maven repository support -->
Original file line number Diff line number Diff line change 1818 <!-- Unit Test -->
1919 <dependency org =" junit" name =" junit" rev =" 4.10"
2020 conf =" test->default" />
21+ <dependency org =" net.sourceforge.cobertura" name =" cobertura" rev =" 1.9.4.1"
22+ conf =" test->default" >
23+ <exclude module =" ant" />
24+ </dependency >
2125
2226 <!-- Static Analysis -->
2327 <dependency org =" com.puppycrawl.tools" name =" checkstyle" rev =" 5.5"
You can’t perform that action at this time.
0 commit comments