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.
精彩评论