Ant + COBERTURA =?

0 respostas
S

Olá pessoal ...
estou utilizando a ferramenta Cobertura para fazer a cobertura de testes de unidade no JUnit .. porem meus relatorios estao retornando 0% e nao deveria, deveria retornar algum valor ...
estou mandando a task onde acho q é o problema ...
Alguem ja usou esta ferramenta e sabe dizer onde esta meu erro ??
Acontece q ele nao esta conseguindo relacionar os testes do Junit com as classes, por isso retorna 0% nos relatorios .. (acho q é algo assim)

<!-- Execute all ProjectTeste unit tests -->
	<target name="unitTests" depends="compile"
            description="execute all ProjectTeste unit tests">
		<java fork="yes" classname="junit.swingui.TestRunner" taskname="unit" failonerror="true">
			<sysproperty key="net.sourceforge.cobertura.datafile" file="${basedir}/cobertura.ser" />

			 <classpath location="${bin.instrumented}" />
			<classpath location="${bin.classes}" />
			<classpath refid="project.classpath" />

			<arg line="projectTeste.AllTests"/>
		</java>
	</target>

	<!-- Execute all ProjectTeste unit tests and generate reports -->
	<!-- This task is not suported by default ant configuration -->
	<!-- This task uses optional ant jars -->
	<target name="unitTests-optional" depends="compile" 
		    description="execute all unit tests">
		<junit fork="yes" printsummary="yes">
			<formatter type="xml"/>
			<classpath location="${bin.classes}" />
			<classpath refid="project.classpath"/>
			<batchtest fork="yes" todir="${doc.unit}">
				<fileset dir="${test}">
					<include name="**/*Test*.java"/>
					<exclude name="**/Acceptance.java"/>
					<exclude name="**/AllTests.java"/>
				</fileset>
			</batchtest>
		</junit>
		<junitreport todir="${doc.unit}">
			<fileset dir="${doc.unit}">
				<include name="TEST*.xml"/>
			</fileset>
			<report format="frames" todir="${doc.unit}"/>
		</junitreport>
	</target>
Criado 21 de junho de 2007
Respostas 0
Participantes 1