开发者

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

开发者 https://www.devze.com 2023-02-05 19:50 出处:网络
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 开发者_开发知识

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

精彩评论

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