RE: [maven] Best practice for integration tests (vs unit tests)

2014-10-07 Thread Jason Pyeron
> -Original Message-
> From: Kevin Burton
> Sent: Tuesday, October 07, 2014 19:28
> 
> Right now I have an overlap of unit and integration tests and 
> I want to
> tear out my integration tests and keep them separate.  This 
> way our unit
> tests execute fast and integration testing takes a bit longer.
> 
> . and now I'm trying to figure out the best strategy for that.
> 
> Reading this:
> 
> http://docs.codehaus.org/display/MAVENUSER/Maven+and+Integration+Testing
> 
> seems to not solve the problem.

Try: 
http://stackoverflow.com/questions/1399240/how-do-i-get-my-maven-integration-tests-to-run

> 
> Seems to me the easiest would be to just have 
> src/main/integration-tests
> 
> . but would I have to use failsafe or surefire?  I'm not sure 
> why I would
> need another plugin for this.
> 
> Maybe someone can enlightenment me with some maven wisdom?

This may not be in line with what you are looking for, but we typically move 
our integration tests to a separate pom.xml which has the primary pom as a 
dependency.


--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-   -
- Jason Pyeron  PD Inc. http://www.pdinc.us -
- Principal Consultant  10 West 24th Street #100-
- +1 (443) 269-1555 x333Baltimore, Maryland 21218   -
-   -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00. 



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



Re: Best practice for integration tests (vs unit tests)

2014-10-07 Thread Karl Heinz Marbaise

Hi Kevin,


the best suggestion i can give is simply make a separate module where 
the integration tests should be moved to...



This has the advantage having different location for them, cause they 
are more than unit tests which is expressed by using a separate module 
furthermore you have the configuration for the integration test within a 
separate module which is more flexible this includes the configuration 
of maven-failsafe-plugin as well.


maven-failsafe-plugin should be used cause it supports a different 
naming schema for your integration tests (*IT.java see docs of 
maven-failsafe-plugin) and you can check the results of the integration 
tests via maven-failsafe-plugin:verify separately...and break the build 
if you like...


Apart from the above integration tests should run at an other phase 
(pre-integration-test,integration-test, post-integration) and NOT in 
test phase...which is handled by maven-failsafe-plugin (see docs 
http://maven.apache.org/surefire/maven-failsafe-plugin/usage.html)


So if you like to run your unit tests parallel you can configure the 
maven-surefire-plugin which does not influence your integration tests...



I would also suggest to put the integration tests into src/test/java 
within the separated module


Kind regards
Karl-Heinz Marbaise

On 10/8/14 1:28 AM, Kevin Burton wrote:

Right now I have an overlap of unit and integration tests and I want to
tear out my integration tests and keep them separate.  This way our unit
tests execute fast and integration testing takes a bit longer.

… and now I’m trying to figure out the best strategy for that.

Reading this:

http://docs.codehaus.org/display/MAVENUSER/Maven+and+Integration+Testing

seems to not solve the problem.

Seems to me the easiest would be to just have src/main/integration-tests

… but would I have to use failsafe or surefire?  I’m not sure why I would
need another plugin for this.

Maybe someone can enlightenment me with some maven wisdom?




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



Best practice for integration tests (vs unit tests)

2014-10-07 Thread Kevin Burton
Right now I have an overlap of unit and integration tests and I want to
tear out my integration tests and keep them separate.  This way our unit
tests execute fast and integration testing takes a bit longer.

… and now I’m trying to figure out the best strategy for that.

Reading this:

http://docs.codehaus.org/display/MAVENUSER/Maven+and+Integration+Testing

seems to not solve the problem.

Seems to me the easiest would be to just have src/main/integration-tests

… but would I have to use failsafe or surefire?  I’m not sure why I would
need another plugin for this.

Maybe someone can enlightenment me with some maven wisdom?

-- 

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile