내 build.xml을 작성하고 있습니다. 그러나 내 junit 작업에 문제가있는 것 같습니다. 내 junit 작업을 실행할 때. 나는 성공을 거둘 수 있지만, junit 보고서는 run 1 테스트를 오류로 보여줍니다. 하지만 10 가지 이상의 테스트가 있습니다. 그래서 내 junit 작업을 실행하는 것이 있는지 궁금합니다. 여기 내 코드가있다.내 개미 junit 작업에 문제가 있는지 궁금합니다.
<property name="src.dir" value="src"/>
<property name="bin.dir" value="bin"/>
<property name="dest.dir" value="dest"/>
<property name="test.dir" value="test/>
<property name="lib.dir" value="lib"/>
<path id="classpath">
<pathelement location="${lib.dir}/junit-4.11.jar"/>
<pathelement location="${lib.dir}/ant-junit4.jar"/>
</path>
<target name="test" depends="compile">
<junit printsummary="yes" haltonfailure="no">
<classpath>
<pathelement location="${bin.dir}"/>
<path refid="classpath"/>
</classpath>
<formatter type="plain" usefile="false"/>
<batchtest fork="yes">
<fileset dir="${test.dir}" includes="*Test*.java"/>
</batchtest>
</junit>
</target>
나는 잘못 이해할 수 없으므로 누군가 나를 도울 수 있습니까?
아마도 JUNIT 테스트 자체가 ... 그 코드는 어떻게 생겼을까요? –
모든 테스트가 테스트 디렉토리 아래에있는 경우가 아니라면 기본 패키지에서'**/* Test * .java'가 필요합니다. –