raf*_*ira 6 java ant code-coverage emma filter
我试图从我的报告中删除一些包并遇到麻烦.
有人可以给我一些帮助吗?
我在我的蚂蚁过程中使用EMMA .
<!-- Generate the emma report both in xml and html -->
<emma>
<report
sourcepath="${build.report.src}"
metrics="class:${coverage.classes.min},method:${coverage.methods.min}">
<fileset dir="${build.report.junit.data.dir}">
<include name="*.emma"/>
</fileset>
<html outfile="${build.report.reports}/emma/raw.html" depth="method"/>
<xml outfile="${build.report.tmp}/emma.xml" depth="method"/>
</report>
</emma>
我试过用:
<filter excludes="com.my.package.*"/>
但没有成功:(
whe*_*eph 10
Emma允许在检测阶段使用过滤器来指定需要检测的一组文件.相反,您正在尝试在报告生成阶段执行此操作.上面给出的 链接描述了如何定义检测集.
我用过这样的过滤器:
<property name="emma.filter" value="-*.unittest.* -*.unittests.* -*.TST* -*TestCase -*Test -*TestSuite" />
<emma>
<instr instrpath="${build.dir}"
mode="overwrite"
metadatafile="${build.dir}/coverage.em"
filter="${emma.filter}" />
</emma>
Run Code Online (Sandbox Code Playgroud)
您还可以在<instr>下使用嵌套的<filter>元素
| 归档时间: |
|
| 查看次数: |
8087 次 |
| 最近记录: |