ANT 작업에서 Junits를 실행하려고하면이 오류가 발생합니다. 이클립스 발사기를 사용하여 잘 작동합니다. junit의 버전은 4.9이고 ANT 버전은 1.7 놀랍게도 JUNIT 3의 패키지 구조 인 "junit.framework.AssertionFailedError"를 제공합니다. , 4에서 org.junit으로 변경되었습니다. 나는 모든 libs를 확인했고, junit 3. * 버전에 대한 참조는 없다. 어쨌든 Eclipse 실행기를 사용했다. 실마리가 있습니까? 더 자세한 정보가 필요한지 알려주십시오. junit.jar
및 ant-junit.jar
개미를 넣어하는 가장 좋은 장소를 http://ant.apache.org/manual/Tasks/junit.html에서 봐 사용하고 있는지, 그들이 JUnit을 4.위한 만들려고 노력하는,junit.framework.AssertionFailedError : xyz 패키지에서 테스트를 찾을 수 없습니다.
<target name="test">
<junit fork="yes" haltonfailure="yes">
<test name="${test.class.name}" />
<formatter type="plain" usefile="false" />
<classpath refid="junittest.classpath" />
</junit>
</target>
jonit.jar이 동기화되지 않았으므로, 1.6.2 – cpandey05
이었습니다. JUnit4를 사용하는 경우, 해당 ant-junit JAR 파일은'ANT_HOME/lib/ant-junit4 .jar'. 우리가 4를 놓치고'ANT_HOME/lib/ant-junit.jar'을 사용하면 다음과 같은 오류가 발생합니다 :'junit.framework.AssertionFailedError : 테스트가 없습니다 '(이것은 ant 버전 1.9.4이며,'ant-junit .jar'와'ant-junit4.jar') – arun