我只是想尝试运行我的junit测试类,它只是从jar文件中获取syso但总是得到错误以下错误:
[junit] Running testcases.TestCalculator
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
[junit] Test testcases.TestCalculator FAILED
请帮我查一下为什么总是显示错误。 请找到build xml。
<target name="jar" depends="compile">
<jar destfile="test.jar" basedir="build">
</jar>
</target>
<target name="run" depends="jar">
<mkdir dir="reports"/>
<junit printsummary="withOutAndErr" fork="true" includeantruntime="true" showoutput="true" >
<batchtest fork="yes" todir="reports">
<resources>
<zipfileset src="test.jar" includes="**/*Test*.class" />
</resources>
</batchtest>
<classpath refid="lib.jar" />
<formatter type="xml"/>
</junit>
</target>
<path id="lib.jar">
<fileset dir="lib">
<include name="*.jar" />
</fileset>
</path>