Я новичок в муравей, и StackOverflow, а также :-)муравей ошибка теста JUnit: NoClassDefFoundError
я получил эту проблему при запуске теста JUnit, попробовала различные способы ее решение, это было 2 дня и я получил ничего :-(
Я mannuly скачал муравей JUnit банку, так как плющ говорит, что не может сделать для меня получить :-(
мой build.xml, только соответствующая часть:
<property name="FileTest" location="${user.home}/software_construction/hg/armidale_students/build/classes/armidale/api/io"/>
<property name="FileTestFiles" location="${user.home}/software_construction/hg/armidale_students/src/armidale/api/io"/>
<property name="JunitJarLocation" location="${user.home}/software_construction/hg/armidale_students/lib/junit-4.11.jar"/>
<property name="hamcrestLocation" location="${user.home}/software_construction/hg/armidale_students/lib/hamcrest-core-1.3.jar"/>
<property name="antjunitLocation" location="${user.home}/software_construction/hg/armidale_students/lib/ant-junit-1.9.3.jar"/>
<junit printsummary="yes" haltonfailure="yes">
<classpath refid="classpath.test" />
<batchtest todir="${JUnitTestOutput}">
<fileset dir="${FileTestFiles}">
<include name="*Test*.java" />
</fileset>
<formatter type="brief" usefile="false"/>
<formatter type="plain"/>
</batchtest>
</junit>
так .java файлы находятся в папке Src и .class файлы находятся в папке Lib Pre спасибо всем, кто отвечает!
Update:
<path id="classpath.test">
<pathelement location="${user.home}/software_construction/hg/armidale_students/lib/ant- junit-1.9.3.jar"/>
<pathelement location="${user.home}/software_construction/hg/armidale_students/lib/junit-4.11.jar}"/>
<pathelement path="${FileTest}" />
</path>
Я не знаю, почему он нуждается в четыре пробела, чтобы сгенерировать код ..... в любом случае, код путь, как описано выше
Было бы здорово иметь все build.xml и ошибку stacktrace. В противном случае это скорее своего рода догадка. – olyv