You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wendy Smoak <ws...@gmail.com> on 2006/06/06 19:53:21 UTC

[m2] Moving Surefire execution from test to integration-test

The Maven webapp archetype creates a structure with only
src/main/webapp and src/main/resources.  It would seem, then, that we
could put integration tests in this module, and not run into the
problem of having both normal JUnit tests and integration tests in the
same module.

To do this, I need to convince Surefire *not* to run during the test
phase, but instead to run during integration-test, (preferably only
when a profile is enabled.)

Is there a way?  If I configure <skip>true</skip>, then *all* of my
executions get skipped. :(

Thanks,
-- 
Wendy

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


Re: [m2] Moving Surefire execution from test to integration-test

Posted by Wendy Smoak <ws...@gmail.com>.
On 6/6/06, Wendy Smoak <ws...@gmail.com> wrote:

> To do this, I need to convince Surefire *not* to run during the test
> phase, but instead to run during integration-test, (preferably only
> when a profile is enabled.)
>
> Is there a way?  If I configure <skip>true</skip>, then *all* of my
> executions get skipped. :(

I haven't found a way to 'un bind' Surefire from the test phase, but
on struts-dev, David DeWolf provided one solution involving <excludes>
during the default Surefire execution in the test phase, then
<includes> in an execution bound to the integration-test phase.

http://www.nabble.com/RE%3A-Maven2-and-Functional-Integration-Tests-p4739258.html

-- 
Wendy

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


RE: [m2] Moving Surefire execution from test to integration-test

Posted by Vincent Massol <vm...@pivolis.com>.

> -----Original Message-----
> From: Wendy Smoak [mailto:wsmoak@gmail.com]
> Sent: mardi 6 juin 2006 19:53
> To: Maven Users List
> Subject: [m2] Moving Surefire execution from test to integration-test
> 
> The Maven webapp archetype creates a structure with only
> src/main/webapp and src/main/resources.  It would seem, then, that we
> could put integration tests in this module, and not run into the
> problem of having both normal JUnit tests and integration tests in the
> same module.

I would put functional tests in a separate module. It's much cleaner and in
any case in order to run functional tests you need to have several
prerequisites:

- the WAR/EAR/etc is built (i.e. the corresponding module is built)
- the database is built and setup
- you need environment data applied (to your container config + possibly to
your WAR/EAR). Note that you'll usually want to store your container config
under a module so that it's version-controlled and managed.

Thus the general way I'd recommend is to have several modules. A WAR is only
a component but to execute it you need an application. An application is a
container + a configuration for the environment + the WAR/EAR/etc. This
requires several modules to achieve it.

That said, putting everything in one module could probably work for the
simple cases but right now it isn't possible with m2.

> To do this, I need to convince Surefire *not* to run during the test
> phase, but instead to run during integration-test, (preferably only
> when a profile is enabled.)
> 
> Is there a way?  

I don't think so. What you can do is bind it to the integration-test phase
in an execution (see last section of the j2ee chapter in the m2 book).

> If I configure <skip>true</skip>, then *all* of my
> executions get skipped. :(

-Vincent


	

	
		
___________________________________________________________________________ 
Yahoo! Mail r�invente le mail ! D�couvrez le nouveau Yahoo! Mail et son interface r�volutionnaire.
http://fr.mail.yahoo.com

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