• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • JUnit和ant結合

    發表于:2007-05-25來源:作者:點擊數: 標簽:junittarget兩個ant結合
    ant 提供了兩個target: junit 和junitreport 運行所有 測試用例 ,并生成html格式的報表 具體操作如下: 1.將junit.jar放在 ANT _HOME\lib目錄下 2.修改build.xml,加入如下內容: propertyname= "report" value= "report" / targetname= "junitreport" dep
    ant 提供了兩個 target : junit 和 junitreport  
    運行所有 測試用例 ,并生成 html 格式的報表 
    具體操作如下: 

    1.將 junit.jar 放在 ANT_HOME\lib 目錄下 
    2.修改 build.xml ,加入如下 內容: 

    1.     <property name="report" value="report" /> 
    2.     <target name="junitreport" depends="clean, compile"
    3.         <junit printsummary="on" 
    4.                 fork="true" 
    5.                 haltonfailure="false" 
    6.                 failureproperty="tests.failed" 
    7.                 showoutput="true"
    8.             <classpath refid="myclasspath"/> 
    9.             <formatter type="xml"/> 
    10.             <batchtest todir="${report}"
    11.                 <fileset dir="${build}"
    12.                     <include name="**/*Test.*"/> 
    13.                 </fileset> 
    14.             </batchtest> 
    15.         </junit> 
    16.         <junitreport todir="${report}"
    17.             <fileset dir="${report}"
    18.                 <include name="TEST-*.xml"/> 
    19.             </fileset> 
    20.             <report format="frames" todir="${report}"/> 
    21.         </junitreport> 
    22.         <fail if="tests.failed"
    23.             --------------------------------------------------------- 
    24.             One or more tests failed, check the report for detail... 
    25.             --------------------------------------------------------- 
    26.         </fail> 
    27.     </target> 

    運行 這個 target ,ant 會運行每個 TestCase  
    在 report 目錄下就有了 很多 TEST*.xml 和 一些網頁 
    打開 report 目錄下的 index.html 就可以看到很直觀的測試運行報告,一目了然。

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>