You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Pete <pe...@gmail.com> on 2005/11/16 23:39:01 UTC

[M2] Any guides or recommendations for Cactus / JUnitEE / Integration Tests

I've reached the stage where I want to be able to run some JUnits that
require :-

- Incontainer JUnits (to be run by JUnitEE or Cactus)
- JUnits that call Session Beans (therefore J2EE container needs to be started)

I know how to do this in Ant but I can't seem to find any guides to
recommendations of how to achieve this with M2.

- I know there is the integration test phase, but how do I use it
- Where should I put these Server side JUnits : do they go inside
     src/test/java   alongside normal JUnits and then exclude them
from 'test' phase?
     Or is it better to have another artefact serverside_tests.jar
that is built separately.
- How do I get the server started (unfortunately I'm using OC4J so
don't have the luxury of existing Ant Tasks. I think I could use Cargo
or just start with exec - but might not be able to stop the server
afterwards.

- Can I aggregate the JUnit Test results with the normal JUnit results ?
- How do I turn all the Test results into HTML (like JUnitReport does) ?

Any advice gratefully received.

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


RE: [M2] Any guides or recommendations for Cactus / JUnitEE / Integration Tests

Posted by Vincent Massol <vm...@pivolis.com>.
Hi Pete,

I haven't tried doing that yet but here's some tips:

- for starting/stopping containers and deploying into them, check the Cargo
project (http://cargo.codehaus.org). Cargo is actually a Cactus' child. It
containers everything that was in Cactus WRT container manipulations. We
also have an unreleased m2 plugin that is undergoing some testing
(http://cargo.codehaus.org/Maven2+plugin). However that's *not* required for
testing.

- The idea is to do the deployments in your junit test classes (in
setUp/teardown methods which you can even wrap in a TestSetup if you want).
Check http://tinyurl.com/btmwa (note: the api has slightly changed in cargo
0.7-snapshot).

That should get you started.

Note: There's no m2 cactus plugin yet.

Thanks
-Vincent

> -----Original Message-----
> From: Pete [mailto:petelists@gmail.com]
> Sent: mercredi 16 novembre 2005 23:39
> To: Maven Users List
> Subject: [M2] Any guides or recommendations for Cactus / JUnitEE /
> Integration Tests
> 
> I've reached the stage where I want to be able to run some JUnits that
> require :-
> 
> - Incontainer JUnits (to be run by JUnitEE or Cactus)
> - JUnits that call Session Beans (therefore J2EE container needs to be
> started)
> 
> I know how to do this in Ant but I can't seem to find any guides to
> recommendations of how to achieve this with M2.
> 
> - I know there is the integration test phase, but how do I use it
> - Where should I put these Server side JUnits : do they go inside
>      src/test/java   alongside normal JUnits and then exclude them
> from 'test' phase?
>      Or is it better to have another artefact serverside_tests.jar
> that is built separately.
> - How do I get the server started (unfortunately I'm using OC4J so
> don't have the luxury of existing Ant Tasks. I think I could use Cargo
> or just start with exec - but might not be able to stop the server
> afterwards.
> 
> - Can I aggregate the JUnit Test results with the normal JUnit results ?
> - How do I turn all the Test results into HTML (like JUnitReport does) ?
> 
> Any advice gratefully received.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org



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