You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Julien HENRY <he...@yahoo.fr> on 2006/11/27 10:09:50 UTC
Running both unit and integration tests in the same module
Hi,
I would like to run both unit tests and integration tests in the same project. I don't want to create a separate module for integration tests (unlike Better Builds With Maven book).
With only one project (and one pom), I want the following lifecycle:
Phase | Action
---------------------------------------------
compile | compile src/main/java
...
test-compile | compile src/test/java
test | run unit test that are in target/test-classes
...
pre-integration-test | compile src/it/java in target/it-classes
integration-test | run it tests that are in target/it-classes
The problem I have is for compiling and running IT tests. The compiler plugin only have two goals (compiler:compile and compiler:testCompile). In BBWM book, the testCompile goal is "customized" to fit with src/it directory, but this configuration prevent running unit test, because we have to define <testSourceDirectory>src/it</testSourceDirectory>.
How can I run both unit tests and integration tests ?
Thank you
Julien
___________________________________________________________________________
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses
http://fr.answers.yahoo.com
Re: Running both unit and integration tests in the same module
Posted by Mark Hobson <ma...@gmail.com>.
On 27/11/06, Julien HENRY <he...@yahoo.fr> wrote:
> I would like to run both unit tests and integration tests in the same project. I don't want to create a separate module for integration tests (unlike Better Builds With Maven book).
You can achieve this, but it's not too pretty. See:
http://docs.codehaus.org/display/MAVENUSER/Maven+and+Integration+Testing
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org