You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by aldana <al...@gmx.de> on 2009/06/22 01:05:26 UTC

problem webapp integration test setup with seperate test module (handling of lifecycle dependencies).

I want to setup a integration test for a webapp.

my project structure (with a seperate test module):
parent/
  -test-webapp
  -webapp

requirement is: 
- webapp (pre-integration-test phase) starts up with jetty:start
- test-webapp test cases are run (integration-test phase)
- webapp (post-integration-test phase) shuts down with jetty:stop

currently I haven't found a way to combine these projects and the dependency
of phase runnings. The post-integration phase is always executed before the
integration-tests are run and thus fail. 

I had a look at http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin
but no success. 
Maybe there is a trick with the reactor plugin where I can pass such
lifecycle dependencies?

thanks.

-----
manuel aldana
aldana((at))gmx.de
software-engineering blog: http://www.aldana-online.de
-- 
View this message in context: http://www.nabble.com/problem-webapp-integration-test-setup-with-seperate-test-module-%28handling-of-lifecycle-dependencies%29.-tp24139775p24139775.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: problem webapp integration test setup with seperate test module (handling of lifecycle dependencies).

Posted by aldana <al...@gmx.de>.

to clarify:
-inside test-webapp I need to disable the tests (because jetty isn't
running), during the lifecycle the tests are compiled
-inside the webapp I need to access the test-cases of test-webapp and
integrate them inside phase integration-test. The access would be done by
passing the path to compiled test classes relatively (e.g.
../../test-webapp/target/test-classes). 

I guess there is no other way to do this?
That all feels very unnatural, maybe I better move the integration tests to
the webapp/ project itself (though I really prefer a dedicated test
module)... 

thanks again.

Stephen Connolly-2 wrote:
> 
> 1. Have a look at the failsafe-maven plugin
> 2. if you insist on having the tests in a separate module, then
> test-webapp cannot depend on webapp, an you will need to add
> test-webapp as a dependency to webapp (with scope test) and then
> unpack it with (as surefire/failsafe do not scan jar files for test
> cases at present)
> 
> 2009/6/22 aldana <al...@gmx.de>:
>>
>> I want to setup a integration test for a webapp.
>>
>> my project structure (with a seperate test module):
>> parent/
>>  -test-webapp
>>  -webapp
>>
>> requirement is:
>> - webapp (pre-integration-test phase) starts up with jetty:start
>> - test-webapp test cases are run (integration-test phase)
>> - webapp (post-integration-test phase) shuts down with jetty:stop
>>
>> currently I haven't found a way to combine these projects and the
>> dependency
>> of phase runnings. The post-integration phase is always executed before
>> the
>> integration-tests are run and thus fail.
>>
>> I had a look at http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin
>> but no success.
>> Maybe there is a trick with the reactor plugin where I can pass such
>> lifecycle dependencies?
>>
>> thanks.
>>
>> -----
>> manuel aldana
>> aldana((at))gmx.de
>> software-engineering blog: http://www.aldana-online.de
>> --
>> View this message in context:
>> http://www.nabble.com/problem-webapp-integration-test-setup-with-seperate-test-module-%28handling-of-lifecycle-dependencies%29.-tp24139775p24139775.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 
> 


-----
manuel aldana
aldana((at))gmx.de
software-engineering blog: http://www.aldana-online.de
-- 
View this message in context: http://www.nabble.com/problem-webapp-integration-test-setup-with-seperate-test-module-%28handling-of-lifecycle-dependencies%29.-tp24139775p24175375.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: problem webapp integration test setup with seperate test module (handling of lifecycle dependencies).

Posted by Stephen Connolly <st...@gmail.com>.
1. Have a look at the failsafe-maven plugin
2. if you insist on having the tests in a separate module, then
test-webapp cannot depend on webapp, an you will need to add
test-webapp as a dependency to webapp (with scope test) and then
unpack it with (as surefire/failsafe do not scan jar files for test
cases at present)

2009/6/22 aldana <al...@gmx.de>:
>
> I want to setup a integration test for a webapp.
>
> my project structure (with a seperate test module):
> parent/
>  -test-webapp
>  -webapp
>
> requirement is:
> - webapp (pre-integration-test phase) starts up with jetty:start
> - test-webapp test cases are run (integration-test phase)
> - webapp (post-integration-test phase) shuts down with jetty:stop
>
> currently I haven't found a way to combine these projects and the dependency
> of phase runnings. The post-integration phase is always executed before the
> integration-tests are run and thus fail.
>
> I had a look at http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin
> but no success.
> Maybe there is a trick with the reactor plugin where I can pass such
> lifecycle dependencies?
>
> thanks.
>
> -----
> manuel aldana
> aldana((at))gmx.de
> software-engineering blog: http://www.aldana-online.de
> --
> View this message in context: http://www.nabble.com/problem-webapp-integration-test-setup-with-seperate-test-module-%28handling-of-lifecycle-dependencies%29.-tp24139775p24139775.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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


Re: problem webapp integration test setup with seperate test module (handling of lifecycle dependencies).

Posted by aldana <al...@gmx.de>.
yes, test-webapp tests http-endpoints exposed from webapp only.


mickknutson wrote:
> 
> Are you only trying to run integration tests against your webapp? Is that
> why you created the test-webapp?
> 
> ---
> Thank You…
> 
> Mick Knutson, President
> 
> BASE Logic, Inc.
> Enterprise Architecture, Design, Mentoring & Agile Consulting
> p. (866) BLiNC-411: (254-6241-1)
> f. (415) 685-4233
> 
> Website: http://baselogic.com
> Linked IN: http://linkedin.com/in/mickknutson
> Vacation Rental: http://tahoe.baselogic.com
> ---
> 
> 
> 
> On Sun, Jun 21, 2009 at 4:05 PM, aldana <al...@gmx.de> wrote:
> 
>>
>> I want to setup a integration test for a webapp.
>>
>> my project structure (with a seperate test module):
>> parent/
>>  -test-webapp
>>  -webapp
>>
>> requirement is:
>> - webapp (pre-integration-test phase) starts up with jetty:start
>> - test-webapp test cases are run (integration-test phase)
>> - webapp (post-integration-test phase) shuts down with jetty:stop
>>
>> currently I haven't found a way to combine these projects and the
>> dependency
>> of phase runnings. The post-integration phase is always executed before
>> the
>> integration-tests are run and thus fail.
>>
>> I had a look at http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin
>> but no success.
>> Maybe there is a trick with the reactor plugin where I can pass such
>> lifecycle dependencies?
>>
>> thanks.
>>
>> -----
>> manuel aldana
>> aldana((at))gmx.de
>> software-engineering blog: http://www.aldana-online.de
>> --
>> View this message in context:
>> http://www.nabble.com/problem-webapp-integration-test-setup-with-seperate-test-module-%28handling-of-lifecycle-dependencies%29.-tp24139775p24139775.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 
> 


-----
manuel aldana
aldana((at))gmx.de
software-engineering blog: http://www.aldana-online.de
-- 
View this message in context: http://www.nabble.com/problem-webapp-integration-test-setup-with-seperate-test-module-%28handling-of-lifecycle-dependencies%29.-tp24139775p24174721.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: problem webapp integration test setup with seperate test module (handling of lifecycle dependencies).

Posted by Mick Knutson <mi...@gmail.com>.
Are you only trying to run integration tests against your webapp? Is that
why you created the test-webapp?

---
Thank You…

Mick Knutson, President

BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring & Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233

Website: http://baselogic.com
Linked IN: http://linkedin.com/in/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---



On Sun, Jun 21, 2009 at 4:05 PM, aldana <al...@gmx.de> wrote:

>
> I want to setup a integration test for a webapp.
>
> my project structure (with a seperate test module):
> parent/
>  -test-webapp
>  -webapp
>
> requirement is:
> - webapp (pre-integration-test phase) starts up with jetty:start
> - test-webapp test cases are run (integration-test phase)
> - webapp (post-integration-test phase) shuts down with jetty:stop
>
> currently I haven't found a way to combine these projects and the
> dependency
> of phase runnings. The post-integration phase is always executed before the
> integration-tests are run and thus fail.
>
> I had a look at http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin
> but no success.
> Maybe there is a trick with the reactor plugin where I can pass such
> lifecycle dependencies?
>
> thanks.
>
> -----
> manuel aldana
> aldana((at))gmx.de
> software-engineering blog: http://www.aldana-online.de
> --
> View this message in context:
> http://www.nabble.com/problem-webapp-integration-test-setup-with-seperate-test-module-%28handling-of-lifecycle-dependencies%29.-tp24139775p24139775.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>