无法生成coverage.emma文件

时间:2014-02-28 19:07:22

标签: java ant junit code-coverage emma

我正在使用emma为简单的junit情况执行代码覆盖。我能够成功地编译,检测并运行来自ant的junit case。我的问题是,我没有生成coverage.emma文件,我认为这是生成覆盖率报告所必需的。以下是我得到的消息:

report: 
[report] processing input files ... 
[report] 1 file(s) read and merged in 10 ms 
[report] nothing to do: no runtime coverage data found in any of the data files 

junit任务如下:

<!-- Run the Juit cases --> 
<target name="runJunit">
    <junit printsummary="on" showoutput="yes" fork="true">
       <test name="com.ea.test.testCode1" />
         <classpath> 
           <pathelement location="${dest.dir}" />
           <pathelement location="C:\junit4.11\junit-4.11.jar" />
         </classpath> 
         <jvmarg value="-XX:-UseSplitVerifier"/> 
         <jvmarg value="-Demma.coverage.out.file=${coverage.dir}/coverage.emma" />                                              
         <jvmarg value="-Demma.coverage.out.merge=false" /> 
    </junit> 
</target> 

0 个答案:

没有答案