You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Douglas Ferguson <do...@douglasferguson.us> on 2010/01/27 18:07:23 UTC

Code Coverage for integration tests

Is there anyway to get code coverage numbers for integration tests?

D/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Code Coverage for integration tests

Posted by Kalle Korhonen <ka...@gmail.com>.
Definitely depends on your definitions for integration test and
circumstances. We run our Spring context-based and other long-running
tests via a special profile-activated surefire configuration together
with plain unit tests to get accurate code coverage counts.

Kalle


On Wed, Jan 27, 2010 at 11:22 AM, Roland Asmann <ro...@adesso.at> wrote:
> Depends on what you call 'integration test'... If it's a couple of tests
> inside a single module, just use cobertura/clover/something else...
>
> If you want an integration-test of several modules, try something like this
> (working on it myself, not finished, so no guarantees!):
> -- (the maven-invoker-plugin springs to mind for this)
> - trigger a new life-cycle for the modules you need, using a profile that
> packages the modules WITH the cobertura/clover/other classes, so the tests
> will be run with coverage-classes
> - have this life-cycle use a separate repository
> - run all your tests using the artifacts from aforementioned repository
> - have the cobertura/clover/other report the findings for you
>
> As I said, for me it's still a work-in-progress (although I've build 2
> projects in a similar fashion, but I wasn't quite satisfied by the number of
> manual steps still involved), but it's a start...
>
>
> On 27-01-10 18:44, Wendy Smoak wrote:
>>
>> On Wed, Jan 27, 2010 at 10:07 AM, Douglas Ferguson
>> <do...@douglasferguson.us>  wrote:
>>
>>> Is there anyway to get code coverage numbers for integration tests?
>>
>> I'm sure it's technically possible, but as far as I know, no one has
>> done it yet with Maven.  It's definitely on my list of things I'd like
>> to see!  Let us know if you figure it out. :)
>>
>
> --
> Roland Asmann
> Senior Software Engineer
>
> adesso Austria Service GmbH
> Bäckerstrasse 1/2/7                 T +43 1 5138877-27
> A-1010 Wien                         F +43 1 5138862
>                                    E roland.asmann@adesso.at
>                                      www.adesso.at
>
> -------------------------------------------------------------
>            >>> business. people. technology. <<<
> -------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Code Coverage for integration tests

Posted by Roland Asmann <ro...@adesso.at>.
Depends on what you call 'integration test'... If it's a couple of tests 
inside a single module, just use cobertura/clover/something else...

If you want an integration-test of several modules, try something like 
this (working on it myself, not finished, so no guarantees!):
-- (the maven-invoker-plugin springs to mind for this)
- trigger a new life-cycle for the modules you need, using a profile 
that packages the modules WITH the cobertura/clover/other classes, so 
the tests will be run with coverage-classes
- have this life-cycle use a separate repository
- run all your tests using the artifacts from aforementioned repository
- have the cobertura/clover/other report the findings for you

As I said, for me it's still a work-in-progress (although I've build 2 
projects in a similar fashion, but I wasn't quite satisfied by the 
number of manual steps still involved), but it's a start...


On 27-01-10 18:44, Wendy Smoak wrote:
> On Wed, Jan 27, 2010 at 10:07 AM, Douglas Ferguson
> <do...@douglasferguson.us>  wrote:
>
>> Is there anyway to get code coverage numbers for integration tests?
>
> I'm sure it's technically possible, but as far as I know, no one has
> done it yet with Maven.  It's definitely on my list of things I'd like
> to see!  Let us know if you figure it out. :)
>

-- 
Roland Asmann
Senior Software Engineer

adesso Austria Service GmbH
Bäckerstrasse 1/2/7                 T +43 1 5138877-27
A-1010 Wien                         F +43 1 5138862
                                     E roland.asmann@adesso.at
                                       www.adesso.at

-------------------------------------------------------------
             >>> business. people. technology. <<<
-------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Code Coverage for integration tests

Posted by Wendy Smoak <ws...@gmail.com>.
On Wed, Jan 27, 2010 at 10:07 AM, Douglas Ferguson
<do...@douglasferguson.us> wrote:

> Is there anyway to get code coverage numbers for integration tests?

I'm sure it's technically possible, but as far as I know, no one has
done it yet with Maven.  It's definitely on my list of things I'd like
to see!  Let us know if you figure it out. :)

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Code Coverage for integration tests

Posted by Siegfried Goeschl <si...@it20one.at>.
Hi Douglas,

I assume you mean code coverage of deployed server code ...

+) many moons ago I did integration code coverage for M1 based on Clover
and Canoo WebTest since we had to prove that 60% of server code was
executed by the remote tests

+) Clover allows to merge coverage information if you run different type
of tests, e.g merge coverage of unit and integration tests

+) I would assume that you can create your instrumented libraries using
M2 profiles

Cheers,

Siegfried Goeschl

Douglas Ferguson wrote:
> Is there anyway to get code coverage numbers for integration tests?
>
> D/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org