On 8/30/06, Todd Nine <[EMAIL PROTECTED]> wrote:
2. I have a project that has both unit tests and integration tests. The unit tests use mock objects and obviously execute automatically when test is performed. How do I specify the tests that need to run for integration testing? Also note that I will need to start Jboss in the pre-integration-test phase and shut it down in the post-integration-test phase. I'm trying the codehaus mojo plug in, but it doesn't quite work as expected, I may end up using cargo. Does anyone have a strong opinion of cargo and any relevant experience?
Yes. Cargo is great. :) Maven doesn't handle having both unit _and_ integration tests in the same module very well yet. If you have the option, move the integration tests to a separate module. There is an example of this in the 'Better Builds with Maven' book: http://www.mergere.com/m2book_download.jsp If not, and you have to keep the tests together, here's a simple example: http://svn.apache.org/repos/asf/shale/framework/trunk/shale-apps/shale-blank/pom.xml You have to play around with the includes/excludes so the integration tests don't run during 'mvn test'. Then you reverse the pattern when the "itest" profile is active. You can also see the configuration for Cargo, which gets used in the CargoTestSetup class to start and stop the container. Please come join us on the mailing lists if you have more questions about Cargo: http://cargo.codehaus.org/Mailing+Lists -- Wendy --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]