You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Philippe Faes <Ph...@elis.UGent.be> on 2006/09/18 11:20:33 UTC

Integration Test

Hi guys,

Is there an easy way to automatically build and test integration test
projects?
I have an integration test in:
./src/test/it/pom.xml
The maven doc suggests this should be build and executed in the
integration-test lifecycle, but 
$ mvn integration-test 
does not run my test.

Any ideas?

thanks
Philipppe



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


Re: Integration Test

Posted by Wendy Smoak <ws...@gmail.com>.
On 9/18/06, Philippe Faes <Ph...@ugent.be> wrote:
> About the directory lay-out; I was looking at a svn checkout of
> http://svn.apache.org/repos/asf/maven/plugins/trunk/
> There seem to be it dirs in:
> ./maven-clover-plugin/src/it
> ./maven-surefire-plugin/src/it
> ./maven-dependency-plugin/src/it
> ./maven-antrun-plugin/src/it
> ./maven-assembly-plugin/src/it
>
> Aren't these supposed to be executed automatically? I thought this
> "subproject" would use the actual project and test it. I suppose these
> are executed manually.

Are you developing a plugin?  The examples you gave are all Maven
plugins, for which there is some sort of testing harness available.
(I haven't used it, but have seen some discussion on the dev list.)

If you're not trying to test a plugin, the examples in the 'Better
Builds with Maven' book and various posts in the list archives will
probably be more relevant.

-- 
Wendy

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


Re: Integration Test

Posted by Philippe Faes <Ph...@UGent.be>.
About the directory lay-out; I was looking at a svn checkout of
http://svn.apache.org/repos/asf/maven/plugins/trunk/
There seem to be it dirs in:
./maven-clover-plugin/src/it
./maven-surefire-plugin/src/it
./maven-dependency-plugin/src/it
./maven-antrun-plugin/src/it
./maven-assembly-plugin/src/it

Aren't these supposed to be executed automatically? I thought this
"subproject" would use the actual project and test it. I suppose these
are executed manually.

Philippe

On Mon, 2006-09-18 at 07:12 -0700, Wendy Smoak wrote:
> On 9/18/06, Philippe Faes <Ph...@elis.ugent.be> wrote:
> 
> > Is there an easy way to automatically build and test integration test
> > projects?
> > I have an integration test in:
> > ./src/test/it/pom.xml
> > The maven doc suggests this should be build and executed in the
> > integration-test lifecycle, but
> > $ mvn integration-test
> > does not run my test.
> 
> I'm not so sure about that directory structure.   You have a pom.xml
> file underneath 'src' ?
> 
> I would expect something like:
>    project/core/
>    project/webapp/
>    project/integration/
>    project/integration/src/test/java   (<-- or src/it/java )
> 
> With the integration tests in a separate module, you can use the info
> on the wiki page that Mykel linked to.  You might need to add
> <testSourceDirectory> if your test classes are not in the default
> src/test/java directory.
> 
> Another option is for the 'integration' module to use packaging type
> 'pom' and for you to bind executions of all the plugins exactly where
> you want them.
> 
> In short, integration testing is not yet supported 'out of the box'
> just by placing classes in the right directory.  It's still under
> discussion, and for now you have to add some configuration.
> 
-- 
Philippe Faes <Ph...@UGent.be>


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


Re: Integration Test

Posted by Wendy Smoak <ws...@gmail.com>.
On 9/18/06, Philippe Faes <Ph...@elis.ugent.be> wrote:

> Is there an easy way to automatically build and test integration test
> projects?
> I have an integration test in:
> ./src/test/it/pom.xml
> The maven doc suggests this should be build and executed in the
> integration-test lifecycle, but
> $ mvn integration-test
> does not run my test.

I'm not so sure about that directory structure.   You have a pom.xml
file underneath 'src' ?

I would expect something like:
   project/core/
   project/webapp/
   project/integration/
   project/integration/src/test/java   (<-- or src/it/java )

With the integration tests in a separate module, you can use the info
on the wiki page that Mykel linked to.  You might need to add
<testSourceDirectory> if your test classes are not in the default
src/test/java directory.

Another option is for the 'integration' module to use packaging type
'pom' and for you to bind executions of all the plugins exactly where
you want them.

In short, integration testing is not yet supported 'out of the box'
just by placing classes in the right directory.  It's still under
discussion, and for now you have to add some configuration.

-- 
Wendy

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


Re: Integration Test

Posted by Mykel Alvis <my...@weirdness.com>.
My understanding is that you need to activate ITs explicitly.
Try looking at http://docs.codehaus.org/pages/viewpage.action?pageId=62120 ,
which is a reference I got from a user list posting a little while back.

On 9/18/06, Philippe Faes <Ph...@elis.ugent.be> wrote:
>
> Hi guys,
>
> Is there an easy way to automatically build and test integration test
> projects?
> I have an integration test in:
> ./src/test/it/pom.xml
> The maven doc suggests this should be build and executed in the
> integration-test lifecycle, but
> $ mvn integration-test
> does not run my test.
>
> Any ideas?
>
> thanks
> Philipppe
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
I'm just an unfrozen caveman software developer.  I don't understand your
strange, "modern" ways.

Re: Integration Test

Posted by Arnaud Bailly <ab...@oqube.com>.
Philippe Faes <Ph...@elis.UGent.be> writes:

> Hi guys,
>

Hello,

> Is there an easy way to automatically build and test integration test
> projects?

I think there is ongoing lengthy discussion about it (check the
confluence wiki). For now, the standard way of doing integration
testing is creating a dedicated project for this. This is what is done
in maven itself. Then your project depends on al integrated modules
and gett built as usual by reactor.


HTH
-- 
OQube < software engineering \ génie logiciel >
Arnaud Bailly, Dr.
\web> http://www.oqube.com


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