You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Niklas Koponen <ni...@iki.fi> on 2009/01/14 10:14:17 UTC

Build lifecycle and integration-test

Hi!

The documentation on the site (
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html)
says following about the integration-test phase.

integration-test - process and deploy the package if necessary into an
environment where integration tests can be run

If I understand correctly this phase is not meant for running any
integration tests. It is just for preparing and copying. This means that the
integration tests should be run by some other means, eg. in a separate
module or running test with some different profiles. Am I correct in my
assumptions?

One issue that supports my argument about not running integration tests in
that phase is that maven does not have any built in support (properties,
phases, it-test src location and so on) for running the integration tests.

The rest of the world seems to think that integration-test phase is meant
for running the integration tests, at least based on the guides around the
web instructing on running integration tests with maven.

We are having a dispute at workplace about this issue and cannot continue
until this is resolved in some way.

Anybody here of the people that originally came up with this build phase? Is
the phase just named in a misleading way.

-Niklas

Re: Build lifecycle and integration-test

Posted by Wendy Smoak <ws...@gmail.com>.
On Wed, Jan 14, 2009 at 2:14 AM, Niklas Koponen <ni...@iki.fi> wrote:

> The documentation on the site (
> http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html)
> says following about the integration-test phase.
>
> integration-test - process and deploy the package if necessary into an
> environment where integration tests can be run
>
> If I understand correctly this phase is not meant for running any
> integration tests. It is just for preparing and copying. This means that the
> integration tests should be run by some other means, eg. in a separate
> module or running test with some different profiles. Am I correct in my
> assumptions?

I think the bit you quoted could be improved. :)  It doesn't say
anything about actually _running_ the tests, though that is mentioned
in the next paragraph.

I use the integration-test phase for running the tests.  The container
setup and deployment happen in pre-integration-test.  There's an
example of integration tests in the same module as a framework example
webapp here [1] though I normally recommend putting them in a separate
module for "real" apps.

Since there is nothing bound to the phases, you can use them for
whatever you want.  If the pom gets too complicated, you might end up
writing your own plugin or inventing a packaging with its own
lifecycle to fit your needs.

There are some thoughts collected on the wiki:
http://docs.codehaus.org/display/MAVENUSER/Maven+and+Integration+Testing

[1] http://svn.apache.org/repos/asf/shale/framework/trunk/shale-apps/shale-usecases/pom.xml

-- 
Wendy

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