I believe without ability to define code fragments for which to skip
coverage analysis, Clover will always be better than Cobertura. You =
cannot
endlessly extend Cobertura configuration - much easier for code =
maintenance
is keeping coverage configuration together with the source code. (e.g. =
Just
imagine referencing portions/lines to exclude from coverage tracking by
providing line numbers in cfg file. What would happen if one adds some =
line
to the file or even whole method...)
I know that adding the parsing of the code would complicate Cobertura.
First solution (working only for Java 1.5+) could base on Java =
annotations -
thus giving control on method/class level - can be implemented e.g. =
using
reflections - without source parsing. It would help to cope with typical
problems of e.g. utility classes (with never invoked empty private
constructor, which only falsifies coverage report).
But to ultimately go down to the line level - parsing would be required.
Regards,
Wojtek
------------------------------
Message: 4
Date: Tue, 28 Nov 2006 14:23:40 -0500
From: Eugene Kuleshov <eu@...>
Subject: Re: [Cobertura-devel] Rework of the ignore option
To: cobertura-devel@...
Message-ID: <456C8CBC.1080103@...>
Content-Type: text/plain; charset=3DISO-8859-1; format=3Dflowed
Actually for stuff like this it could look into the source code. I.e.=20
use simple patters to identify line ranges in the source code, then use=20
these ranges when instrumenting bytecode...
regards,
Eugene
John W. Lewis wrote:
> The problem is that Cobertura does not actually look at the source.=20
>
> -----Original Message-----
> From: cobertura-devel-bounces@...
[mailto:cobertura-devel-bounces@...] On Behalf Of =
Aaron
Digulla
> Sent: Tuesday, November 28, 2006 9:04 AM
> To: cobertura-devel@...
> Subject: Re: [Cobertura-devel] Rework of the ignore option
>
> Hello,
>
> These ignore options are not fine-grained enough.
>
> In Clover, you can take out lines in the source by wrapping them in
"///CLOVER:ON" and "///CLOVER:OFF". Since you read the source anyway, I
suggest that you take these comments into account.
>
> This way, users can take out single lines (for example, =
SecurityException
when using reflection) or whole methods out of the coverage and you're
compatible with clover so more users will try out Cobertura.
>
> Regards,
>
> --
> Aaron "Optimizer" Digulla a.k.a. Philmann Dark "It's not the universe
that's limited, it's our imagination.
> Follow me and I'll show you something beyond the limits."
> http://www.philmann-dark.de/
>
> =
-------------------------------------------------------------------------=
=20
--=20
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.430 / Virus Database: 268.14.17/553 - Release Date: =
2006-11-27
04:00
=20
|