6
我正在使用純JUnit 4測試,並將它們編譯到某些屬於類路徑的jar中。 我想在我的類路徑中運行所有測試。JUnit在JAR中運行測試
有沒有辦法?
我的任務是這樣的:
<target name="test" description="All the tests">
<junit fork="yes">
<classpath>
<path refid="test.classpath" />
<fileset dir="war/WEB-INF/lib/">
<include name="*.jar"/>
</fileset>
<fileset dir="war/WEB-INF"/>
<fileset dir="war"/>
</classpath>
<formatter type="plain" usefile="false" />
</junit>
</target>
它只是工作,謝謝 –