ant 运行JUnit
示例
下面将在匹配的测试上运行JUnittest/**/*Test.java。这需要junit.jar放在lib文件夹中。
<project name="Project" default="junit" basedir=".">
<path id="classpath">
<fileset dir="lib" includes="**/*.jar"/>
<pathelement path="build"/>
</path>
<target name="compile">
<javac srcdir="test" destdir="build" classpathref="classpath"/>
</target>
<target name="junit" depends="compile">
<junit fork="true" logfailedtests="false">
<classpath refid="classpath"/>
<batchtest>
<fileset dir="test" includes="**/*Test.java"/>
<formatter type="plain" usefile="false"/>
</batchtest>
</junit>
</target>
</project>
热门推荐
10 财运虎年祝福语简短语
11 单亲爸爸春节祝福语简短
12 狗狗上厕所训练
13 植物种植祝福语简短
14 翻译考试祝福语朋友简短
15 个人周年庆简短祝福语
16 狗狗怎么训练
17 分别祝福语简短搞笑英文
18 生日广州男生祝福语简短