Ant JUnit results not being outputted
I am running an Ant task which runs junit tests. I want the results of the tests to be outputted to XML. I do:
<target name="test" depends="clean,compile">
<junit showoutput="yes" fork="true">
<classpath refid="test.classpath" />
<formatter type="plain" usefile="false" />
<batchtest todir="${test.results.dir}">
<fileset dir="${tests.dir}">
<include name="**/*TestSuite.java"/>
</fileset>
</batchtest>
</junit>
</target>
But nothing is outputted. What are my doing wrong?
You have to set the formatter's type to xml
.
<formatter type="xml" usefile="false" />
Remove the usefile
attribute if you want to write the output to a file.
<formatter type="xml" />
链接地址: http://www.djcxy.com/p/86090.html
上一篇: 用ant 1.9.4运行junit4测试(jvm crash with fork =“true”)
下一篇: Ant JUnit结果未被输出