posts - 56, comments - 77, trackbacks - 0, articles - 1
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

    <target name="emma.reporting">

       <emma enabled="true">

           <report sort="+name" metrics="method:80,block:90,line:80,class:100">

              <fileset dir="your/emma/dir">

                  <include name="*.emma" />

              </fileset>

              <html outfile="your/emma/dir/coverage.html" />

           </report>

       </emma>

    </target>

 

    <target name="emma.check">

       <loadfile property="emma.output" srcFile="your/emma/dir/coverage.html" />

       <fail message="Your code coverage is too low.">

           <condition>

              <contains string="${emma.output}" substring='class="h"' casesensitive="false" />

           </condition>

       </fail>

   </target>


只有注册用户登录后才能发表评论。


网站导航: