My personal experience is that Cobertura doesn't provide the same level of 
statistics, doesn't break down the coverage into as many categories (lines & 
branches vs stmts, branches, classes and methods) and can be inaccurate. For 
example, I've had cobertura report that a line with nothing but a '{' on it 
wasn't covered even though the line before and the lines inside the block were 
covered. This screws up the code coverage percentages.  I don't know how well 
this will come through, but here is an example from Commons VFS.
1. The first try isn't being counted at all.
2. The second try is counted but has a value of 0 even though the method inside 
the block is called 132 times.

 695            
             try
 696            
             {
 697     132    
                 super.onClose();
 698            
             }
 699            
             finally
 700            
             {
 701     0      
                 try
 702            
                 {
 703     132    
                     endOutput();
 704            
                 }
 705     0      
                 catch (Exception e)
 706            
                 {
 707     0      
                     throw new 
FileSystemException("vfs.provider/close-outstr.error", file, e);
 708     132    
                 }
 709            
             }
 710     132    
         }

Ralph

On Dec 23, 2009, at 11:56 AM, Gary Gregory wrote:

> Hi All:
> 
> [I am replying here to message (below) posted on [email protected] on 12/20/2009 
> 03:17 by Michael McCandless]
> 
> As an open source community, I feel we should eat our own open source 
> philosophy dog food and use open source software whenever possible. I've used 
> Cobertura for a while now on various Commons projects and at work and its 
> reports are just as useful and pretty as Clover. I also believe that each 
> project community is free to do what it feels serves it best.
> 
> At this time, though, I wonder what Clover offer that is so much better than 
> Cobertura to merit put aside what I feel is an important philosophical point.
> 
> What we do at Apache for this type of issue is very important IMO when we 
> think about the image and expertise that we project. We are a technical 
> community and people look to our choices as implicit guidance if not 
> endorsement. When we pick a commercial product like Clover over an open 
> source solution (like Cobertura), I feel we are telling the world that there 
> is no one in the open source space that could serve our need and that we had 
> to turn to a commercial product. That fact that we have a free license is 
> besides the point.
> 
> My 2c,
> Gary
> ----------------------------------------------------
> On 12/20/2009 03:17, Michael McCandless wrote:
> 
> Hi all,
> 
> Atlassian has generously donated a site license to Apache for Clover
> 2.6, to test code coverage for any source code under org.apache.
> 
> We've checked the license in here:
> 
> https://svn.apache.org/repos/private/committers/donated-licenses/clover/2.6.x/
>  
> 
> In Atlassian's words: The license is available to anyone working on
> the org.apache.* be it in IDEA/Eclipse/Ant/Maven locally, or on a
> central build server.  Since the license will only instrument and
> report coverage on org.apache packages, please mention that it is fine
> to commit this license to each project if it makes running builds
> easier. ie just check out the project and run with Clover, without the
> need for the extra step of locating and installing the clover license.
> 
> Uwe Schindler has worked with Atlassian to upgrade Lucene's nightly
> build to use Clover 2.6 and the resulting report is great, eg:
> 
> http://hudson.zones.apache.org/hudson/job/Lucene-trunk/lastSuccessfulBuild/clover-report
>  
> 
> Feel free to fold into your build, use Clover during development, etc.
> 
> Mike
> 
> 
> <ForwardedMessage.eml>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]

Reply via email to