It looks like Cargo is a wrapper for J2EE containers.  I don't see how
this would help in this specific situation, since my project is a client
calling the server and the server is not a J2EE application.
The point of the tests is to ensure that the assumptions I made about
the server communication protocol when creating the mock objects for the
unit tests is actually valid.  The only way to really do this is to have
the actual server set up and actually talk to it.  Configuring the
server involves installing the server, manipulating some configuration
files, loading the server with content, and starting & restarting the
server.  This could potentially be automated (though the server doesn't
really support automation for everything at this time), but even then it
wouldn't be something we'd want to run with every build.

I'd rather not make a separate project for this, since I'd like them
more closely associated with the project it's testing, but could do it
as a last resort.


-----Original Message-----
From: Vincent Massol [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 13, 2005 10:56 AM
To: 'Maven Users List'
Subject: RE: Running integration tests



> -----Original Message-----
> From: David Jackman [mailto:[EMAIL PROTECTED]
> Sent: vendredi 13 mai 2005 18:32
> To: Maven Users List
> Subject: Running integration tests
> 
> For one of my projects, I need to add some integration tests that are 
> separate from the unit tests.  The unit tests work as they 
> should--they are fully automated and run with every build.  The 
> integration tests are different in that they can't be fully automated 
> since they depend on some external resources (in this case a 
> specifically configured server) being available.

Why can't this be automated? Maybe Cargo (http://cargo.codehaus.org)
could help?

http://tinyurl.com/8djb
http://tinyurl.com/dnll2
http://tinyurl.com/btmwa

>  However, when these resources are in place I would like to be able to

> use Maven to run the tests.  I didn't see a plugin that directly 
> addresses this situation, but did notice the 
> "integrationUnitTestSourceDirectory" element of the POM that has been 
> documented as deprecated.  Is anyone out there doing this sort of
thing?
> Is there a best practice I can follow for the fewest headaches?

Maybe the Cargo Maven plugin?
 
> Here was my planned approach:
> 1. Create an "integrationtest" directory tree in src that is a sibling

> to the unit tests in "test".  The integrationtest directory will have 
> a java subdir for the source code, a resources directory for 
> non-compiled files that need to be in the classpath, and a data 
> directory that contains the files and instructions necessary for 
> setting up the external resources.

An idea: Why don't you create a separate subproject to run your
integration tests that you would put in src/test?

> 2. Create "integrationtest:xxx" goals in the project's maven.xml that 
> correspond to the test plugin goals the set the test plugin properties

> to point to the integrationtest directory then run the corresponding 
> test goal.
> 
> Thanks,
> ..David..

-Vincent





---------------------------------------------------------------------
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