java

位置:IT落伍者 >> java >> 浏览文章

使用Ant编译、运行Junit、以及检查编码[4]


发布日期:2018年03月06日
 
使用Ant编译、运行Junit、以及检查编码[4]

<! 运行junit >

<target name=junit depends=compilejunit>

<junit printsummary=yes haltonfailure=yes>

<classpath>

<path refid=classpath/>

<pathelement location=${distjunit}/>

</classpath>

<formatter type=plain/>

<! test name=comTestClassTest haltonfailure=no outfile=result/ >

<batchtest todir=${distjunit}>

<fileset dir=${distjunit} includes=**/Test*class />

</batchtest>

</junit>

</target>

<! 清除产生的类junit相关类文档 >

<target name=clean>

<delete dir=${distclasses}/>

<delete dir=${distjunit}/>

<delete dir=${docapi}/>

</target>

<! 清除所有输出结果 >

<target name=cleanall depends=clean>

<delete dir=${docdir}/>

<delete dir=${distroot}/>

</target>

</project>

[] [] [] []

               

上一篇:使用Ant编译、运行Junit、以及检查编码[1]

下一篇:Ant的一些偏门技巧[1]