开发者

Where can I find a single summary coverage number in Cobertura?

I run Cobertura on my codebase and get coverage numbers by the class, line, and branch.

Besides this, I am looking for a single summary number which tells me the coverage for my whole 开发者_开发知识库codebase. That's not enough of course; the detailed reports are essential. But having a single number gives us a metric which we can continually improve.

I don't see such a number in the reports. Where can I find it?


If you look at the sample report, the total metrics are reported in the "All Packages" row.


You can use the format="summaryXml" attribute for this

<target name="summary-coverage-report">
    <cobertura-report srcdir="${src.dir}" destdir="${coverage.summaryxml.dir}" format="summaryXml" />
</target>

See the example here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜