You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Ian Boston <ie...@tfd.co.uk> on 2008/07/22 11:59:09 UTC

Unit test coverage

Hi,

I vaguely remember a discussion about Unit Test code coverage, and  
some quality metrics, but looking at the base pom.xml there doesn't  
appear to be a section that I can get to work.

Some questions:
Did someone build a maven site with code coverage in place ?
Does the reporting profile work, if so anyone know how to run it ?

I have a patch that works to build a site, but I wanted to check  
there was already work done here.

Is is Ok to add the cobertura maven plugin to the base pom so we can  
generate these reports (BTW, code coverage looks good already), the  
maven plugin is ASFL2 but the core of Cobertura is GPL, however their  
site appears to say that they have been careful about bindings http:// 
cobertura.sourceforge.net/license.html and Apache commons appears to  
use it http://commons.apache.org/io/cobertura/index.html.


Ian


Re: [jira] Commented: (SHINDIG-463) Support Anonymous Security Tokens

Posted by Ian Boston <ie...@tfd.co.uk>.
Yes,
That made sense, but when I tried to get it all to build into a  
connected site it didn't behave, just produced local sites to each  
project.
so I put some reporting plugins into the base pom (not committed,  
yet). I've uploaded to
http://people.apache.org/~ieb/shindig/

it has some extra reports, like checkstyle
http://people.apache.org/~ieb/shindig/shindig-parent/shindig-social- 
api/project-reports.html

Checkstyle isn't configured correctly for our style at the moment,  
but it doesn't look hard. 20 mins probably to edit the checkstyle.xml,

I can keep this as a local patch for my own checking, but if its  
useful I can commit.

?

Ian

On 22 Jul 2008, at 17:55, Cassie wrote:

> Yup - it is already checked in. The coverage uses cobertura and you
> can find the details on this bug:
> https://issues.apache.org/jira/browse/SHINDIG-243
>
> You run this command:
> mvn site -Preporting
>
> And it usually seems to need to run from the java dir to pick up some
> cobertura data file or something.
> Afterwards your data will end up here:
>
> file:///<your client>/java/social-api/target/site/index.html
> file:///<your client>/java/social-api/target/site/cobertura/index.html
> (works for the other sub dirs too - also has javadocs and what not)
>
> It actually looks like the social stuff isn't doing too bad anymore -
> 82% and 70% coverage. Still room for improvement, but not horribly
> embarrassing.
>
> - Cassie
>
>
>
> On Tue, Jul 22, 2008 at 2:59 AM, Ian Boston <ie...@tfd.co.uk> wrote:
>> Hi,
>>
>> I vaguely remember a discussion about Unit Test code coverage, and  
>> some
>> quality metrics, but looking at the base pom.xml there doesn't  
>> appear to be
>> a section that I can get to work.
>>
>> Some questions:
>> Did someone build a maven site with code coverage in place ?
>> Does the reporting profile work, if so anyone know how to run it ?
>>
>> I have a patch that works to build a site, but I wanted to check  
>> there was
>> already work done here.
>>
>> Is is Ok to add the cobertura maven plugin to the base pom so we can
>> generate these reports (BTW, code coverage looks good already),  
>> the maven
>> plugin is ASFL2 but the core of Cobertura is GPL, however their  
>> site appears
>> to say that they have been careful about bindings
>> http://cobertura.sourceforge.net/license.html and Apache commons  
>> appears to
>> use it http://commons.apache.org/io/cobertura/index.html.
>>
>>
>> Ian
>>
>>


Re: Unit test coverage

Posted by Cassie <do...@google.com>.
Yup - it is already checked in. The coverage uses cobertura and you
can find the details on this bug:
https://issues.apache.org/jira/browse/SHINDIG-243

You run this command:
mvn site -Preporting

And it usually seems to need to run from the java dir to pick up some
cobertura data file or something.
Afterwards your data will end up here:

file:///<your client>/java/social-api/target/site/index.html
file:///<your client>/java/social-api/target/site/cobertura/index.html
(works for the other sub dirs too - also has javadocs and what not)

It actually looks like the social stuff isn't doing too bad anymore -
82% and 70% coverage. Still room for improvement, but not horribly
embarrassing.

- Cassie



On Tue, Jul 22, 2008 at 2:59 AM, Ian Boston <ie...@tfd.co.uk> wrote:
> Hi,
>
> I vaguely remember a discussion about Unit Test code coverage, and some
> quality metrics, but looking at the base pom.xml there doesn't appear to be
> a section that I can get to work.
>
> Some questions:
> Did someone build a maven site with code coverage in place ?
> Does the reporting profile work, if so anyone know how to run it ?
>
> I have a patch that works to build a site, but I wanted to check there was
> already work done here.
>
> Is is Ok to add the cobertura maven plugin to the base pom so we can
> generate these reports (BTW, code coverage looks good already), the maven
> plugin is ASFL2 but the core of Cobertura is GPL, however their site appears
> to say that they have been careful about bindings
> http://cobertura.sourceforge.net/license.html and Apache commons appears to
> use it http://commons.apache.org/io/cobertura/index.html.
>
>
> Ian
>
>