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 邮政考试祝福语简短励志