From: Nicolas B. <co...@ho...> - 2005-07-20 12:27:07
|
Hi, I have used Cobertura in order to test coverage of several projects. Now, as those different projects deal with the same global project but are not linked, I would like to merge the different reports generated in a single one. I suppose the merge function of Cobertura is designed to do so. I copy all the source files, and then I merge the different files cobertura.ser obtained previously. Finally I generate a coverage-report. My ant file suceeds in copying source, in finding data files cobertura.ser and in generating the report. The trouble is that when I look at the generated report, only one of the two cobertura.ser file is taken into account. To sum up, merging has not been done. Please light me. Is there any example of merging available somewhere ? To do so, I use the following the Ant file : <?xml version="1.0"?> <project name="rapportcouverture" default="coverage" basedir="."> <!-- Declaration de la tache de couverture --> <taskdef classpath="cobertura.jar" resource="tasks.properties"/> <!-- Referentiel CVS --> <property name="cvs.cvsroot" value="${env.CVSROOT}" /> <property name="source.dir" location="src" /> <property name="src-all.dir" location="src/com/airbus/" /> <!-- Arborescence necessaire a la couverture (peut figurer dans le fichier *.properties) --> <property name="reports.dir" value="${basedir}/document/coverage"/> <!-- Path necessaire a la couverture --> <path id="coverage.classpath"> <fileset dir="${lib.dir}"> <include name="cobertura.jar" /> <include name="**/*.jar" /> </fileset> </path> <target name="clean" description="Suppression du rapport de couverture"> <delete includeEmptyDirs="true" quiet="true"> <fileset dir="document" /> <fileset dir="${source.dir}" /> <fileset dir="cobertura.ser" /> </delete> </target> <target name="mkoutdir"> <mkdir dir="${reports.dir}" /> </target> <!-- Copie des sources Java vers le repertoire de compilation --> <target name="copy-src" depends="mkoutdir" description="Copie de tous les fichiers source java pour compilation"> <mkdir dir="${src-all.dir}"/> _________________________________________________________________ MSN Hotmail : antivirus et antispam gratuits http://www.imagine-msn.com/hotmail/default.aspx?locale=fr-FR |