这个图像是一个测试,从Netbeans运行。我太完美了。它完成了我所有的17项测试。
当我使用ant运行它时,它只运行了1次测试和1次错误。
测试运行:1失败:0错误:1跳过:0时间流逝:0秒
我的junit测试代码。
<target name="junit" depends="compile">
<junit printsummary="yes">
<test name="${test.class.name}" />
<classpath refid="test.classpath" />
</junit>
</target>帮助
发布于 2015-10-09 18:49:16
test测试只运行一个测试。您可以使用batchtest运行多个测试:
<target name="junit" depends="compile">
<junit printsummary="yes">
<classpath refid="test.classpath" />
<batchtest>
<fileset dir="${test-dir}" includes="**/Test*.class" />
</batchtest>
</junit>
</target>https://stackoverflow.com/questions/33045135
复制相似问题