熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Java編程 >> Java開源技術 >> 正文

使用Ant編譯、運行Junit、以及檢查編碼[4]

2013-11-23 20:55:06  來源: Java開源技術 

    <!  運行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>

[]  []  []  []  


From:http://tw.wingwit.com/Article/program/Java/ky/201311/29290.html
    推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.