Elad Tabak | 19 Jun 2012 14:54

Re: Mojo's Maven plugin for Cobertura - read report

Hi,
I run a maven build with cobertura:cobertura, and I see cobertura.ser file created under the target directory.
I expected to get some kind of xml or html, since I set it up under the plugin configuration settings, as explained here:
http://mojo.codehaus.org/cobertura-maven-plugin/examples/report-formats.html
Is this the expected output?
How do I get this file to be html format?

Thanks,
Elad

Wayne Fay | 21 Jun 2012 06:27
Picon
Gravatar

Re: Re: Mojo's Maven plugin for Cobertura - read report

> I run a maven build with cobertura:cobertura, and I see cobertura.ser file
> created under the target directory.
> I expected to get some kind of xml or html, since I set it up under the
> plugin configuration settings, as explained here:
> http://mojo.codehaus.org/cobertura-maven-plugin/examples/report-formats.html
> Is this the expected output?
> How do I get this file to be html format?

The ser file is created by Cobertura as described on the project's
website [1] and has little to do with the reporting output provided by
the Maven plugin.

Q: When I generate coverage reports, why do they always show 100%
coverage everywhere?
Q: When I generate coverage reports, why do they always show 0%
coverage everywhere?
A: Cobertura is probably using the wrong .ser file when generating the
reports. When you instrument your classes, Cobertura generates a .ser
file containing basic information about each class. As your tests run,
Cobertura adds additional information to this same data file. If the
instrumented classes can not find the data file when running then they
will create a new one. It is important that you use the same
cobertura.ser file when instrumenting, running, and generating
reports.

[1] http://cobertura.sourceforge.net/faq.html

Wayne

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Gmane