It is possible to just run unit tests or integration tests from a module but it 
gets messy and over complicated.
For example I have projects that separate tests by placing all unit tests in a 
directory called unit and all integration tests in a directory called it.
With such a separation it makes it easier to configure the compile plug-in to 
exclude tests at certain phases. Likewise the surefire plug-in needs to be 
configured accordingly with excludes and includes. Then using a profile you can 
invoke the integration tests which will only run integration tests.

This all works fine until you need to generate a site that contains both 
surefire reports for unit test runs and integration test runs. It's not 
straightforward as the underlying surefire report plug-in is not as flexible.

I'm just waiting for when the next major release of Maven is made as the issue 
of test separation I believe is addressed

--
Robert

-----Original Message-----
From: Kristof Vanbecelaere [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 28, 2008 12:03 AM
To: users@maven.apache.org
Subject: Re: maven-surefire-plugin configuration for unit/integration tests


I disagree. Have you ever written a selenium test? This is trial and error. I
have not touched any "real" code, only test code. So I know my unit tests
succeed. All I want to do is run the integration-test phase without unit
tests.


Stephen Connolly-2 wrote:
> 
> 2008/11/27 Kristof Vanbecelaere <[EMAIL PROTECTED]>
> 
> Actually, that is the aim.
> 
> You run all the unit tests to make sure that the code is good enough to
> try
> and run the integration tests.
> 
> If your unit tests fail, your code is broken and you know it, so fix your
> code.
> 
> If your unit tests pass, now lets see if it integrates correctly, hence
> run
> the integration tests.
> 
> If the integration tests pass, we can publish the project (i.e. install or
> deploy to maven repo)
> 
> This is what the lifecycle is all about... a well defined sequence of
> phases, all the previous phases must complete successfully before the next
> phase starts.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/maven-surefire-plugin-configuration-for-unit-integration-tests-tp20724622p20730286.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to