It'll probably get closed as a duplicate, but thanks for the input.
It *should* still be possible to achieve what you want currently (I thought Vincent's chapter discussed that, but I don't might be mistaken). It may take some effort, though, and I'm not sure of any existing examples. The 'integration-test' phase was meant to be a general hook to facilitate this where possible. We've always wanted to better support this in Maven. The problem is that we didn't come to any agreement on what it should work like by the time 2.0 was released, so it's something we're looking at for 2.1 instead. I haven't looked at the page Wendy pointed to recently, but it was meant to capture a summary of the discussion. I'll have to take some time to check that it is complete. The upshot of this is that we agree it should work, and if you have any ideas for how it should work then we'd be glad to hear them. Cheers, Brett On 06/06/06, Craig McClanahan <[EMAIL PROTECTED]> wrote:
On 6/5/06, Wendy Smoak <[EMAIL PROTECTED]> wrote: > > On 6/5/06, Craig McClanahan <[EMAIL PROTECTED]> wrote: > > If I'm reading 'Better Builds With Maven" correctly, it seems that the > > recommended practice for functional or system integration tests for > webapps > > (i.e. where you deploy the app to a server and then execute HTTP > requests > > and examine the result) is to build a separate "functional-tests" module > per > > webapp. Yuck. Is that the only way to do it? I was spoiled in my > previous > > build.xml scripts to be able to run "ant install systest" on a webapp > module > > and have it deploy my app plus execute the integration tests > immediately, > > with the tests themselves being in a separate source directory (my > > convention was "src/systest") in the same project. > > Although Maven 2.0 has build lifecycle phases for both 'test' and > 'integration-test', it doesn't seem to handle doing both of them in > the same module. > > Surefire looks at the <build>/<testSourceDirectory> to find the test > sources -- there is no <integrationTestSourceDirectory>, and no way > that I'm aware of to have two executions of Surefire in the same > module that use different source directories. > > There's some information on the StrutsMaintenanceMaven wiki page, > including a link to a page on the Maven wiki where integration testing > strategies are being worked out: > http://docs.codehaus.org/display/MAVEN/best+practices+-+testing+strategies > > For a while it seemed like Vincent was going to be allowed to make > some changes in Maven 2.0, but nothing has happened recently, and one > of the issues linked to from that wiki page is marked 'fix for 2.1.1'. > > For Struts Action, all of the integration tests live in > action/integration/apps-it, and the plugin executions are wrapped in a > profile so they don't run unless you use -Pperform-itest. > > I agree that having the tests in a separate module isn't ideal, but I > think we'll have to live with it for a while. > > BTW, here's the TestSetup class that uses Cargo to start Tomcat and > deploy the apps: > > http://svn.apache.org/repos/asf/struts/action/trunk/integration/apps-it/src/test/java/org/apache/struts/apps/Tomcat5xTestSetup.java I'll do my part[1] to encourage positive change in this regard. -- > Wendy Craig [1] http://jira.codehaus.org/browse/MNG-2344
-- Apache Maven - http://maven.apache.org "Better Builds with Maven" book - http://library.mergere.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]