You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Greg Akins <an...@gmail.com> on 2010/11/27 01:50:46 UTC

Custom Lifecycle

I want to run selenium tests outside of the normal build cycle.
They're working right now in the integration-test phase, but I can't
allow them to run from the build server (they'll fail).

It seems like I'll need to define a custom lifecycle, but I don't
completely understand everything I'll need to do to accomplish that.

Rather than just running the selenium goals, I'd like to keep the
tomcat startup, cargo, junit execution and selenium server start in
one tasks.. so I don't think it's enough to just run the selenium
task.

Thoughts?

-- 
Greg Akins

http://insomnia-consulting.org
http://www.pghcodingdojo.org
http://pittjug.dev.java.net
http://twitter.com/akinsgre
http://www.linkedin.com/in/akinsgre

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


Re: Custom Lifecycle

Posted by Greg Akins <an...@gmail.com>.
On Sat, Nov 27, 2010 at 7:24 AM, Antonio Petrelli
<an...@gmail.com> wrote:
> As Kalle said, use a profile for this. For a real world example, take
> a look at Tiles test webapp POM:
> http://svn.eu.apache.org/repos/asf/tiles/framework/trunk/tiles-test-pom/tiles-test/pom.xml
> In particular, see the "run-selenium" profile.

Thanks Antonio.. Now that you mention it, I remember that the Tiles
project used profiles.  I was just not thinking clearly when I started
adding my own configuration.

In case anyone else runs across this post in the future, the excellent
instructions that I used for setting up Selenium tests is
http://www.vineetmanohar.com/2007/06/maven-selenium/#How_to_run_selenium_tests_in_integration_test_phase

His instructions use Selenium/Junit tests, the Selenium plugin to
start the Selenium server (not Selenese like Tiles does it) and Cargo
to automatically deploy the webserver.  They are very well written
instructions.  Some of the dependencies are a bit out of date now, so
I had to do some searching through the Maven repos to find the correct
libraries.



-- 
Greg Akins

http://insomnia-consulting.org
http://www.pghcodingdojo.org
http://pittjug.dev.java.net
http://twitter.com/akinsgre
http://www.linkedin.com/in/akinsgre

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


Re: Custom Lifecycle

Posted by Antonio Petrelli <an...@gmail.com>.
2010/11/27 Greg Akins <an...@gmail.com>:
> Rather than just running the selenium goals, I'd like to keep the
> tomcat startup, cargo, junit execution and selenium server start in
> one tasks.. so I don't think it's enough to just run the selenium
> task.

As Kalle said, use a profile for this. For a real world example, take
a look at Tiles test webapp POM:
http://svn.eu.apache.org/repos/asf/tiles/framework/trunk/tiles-test-pom/tiles-test/pom.xml
In particular, see the "run-selenium" profile.

Antonio

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


Re: Custom Lifecycle

Posted by Greg Akins <an...@gmail.com>.
Doh!  Great idea.. didn't even think of that. Thanks!

On Fri, Nov 26, 2010 at 8:15 PM, Kalle Korhonen
<ka...@gmail.com> wrote:
> Why not just use a profile for this?
>
> Kalle
>
>
> On Fri, Nov 26, 2010 at 4:50 PM, Greg Akins <an...@gmail.com> wrote:
>> I want to run selenium tests outside of the normal build cycle.
>> They're working right now in the integration-test phase, but I can't
>> allow them to run from the build server (they'll fail).
>>
>> It seems like I'll need to define a custom lifecycle, but I don't
>> completely understand everything I'll need to do to accomplish that.
>>
>> Rather than just running the selenium goals, I'd like to keep the
>> tomcat startup, cargo, junit execution and selenium server start in
>> one tasks.. so I don't think it's enough to just run the selenium
>> task.
>>
>> Thoughts?
>>
>> --
>> Greg Akins
>>
>> http://insomnia-consulting.org
>> http://www.pghcodingdojo.org
>> http://pittjug.dev.java.net
>> http://twitter.com/akinsgre
>> http://www.linkedin.com/in/akinsgre
>>
>> ---------------------------------------------------------------------
>> 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
>
>



-- 
Greg Akins

http://insomnia-consulting.org
http://www.pghcodingdojo.org
http://pittjug.dev.java.net
http://twitter.com/akinsgre
http://www.linkedin.com/in/akinsgre

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


Re: Custom Lifecycle

Posted by Kalle Korhonen <ka...@gmail.com>.
Why not just use a profile for this?

Kalle


On Fri, Nov 26, 2010 at 4:50 PM, Greg Akins <an...@gmail.com> wrote:
> I want to run selenium tests outside of the normal build cycle.
> They're working right now in the integration-test phase, but I can't
> allow them to run from the build server (they'll fail).
>
> It seems like I'll need to define a custom lifecycle, but I don't
> completely understand everything I'll need to do to accomplish that.
>
> Rather than just running the selenium goals, I'd like to keep the
> tomcat startup, cargo, junit execution and selenium server start in
> one tasks.. so I don't think it's enough to just run the selenium
> task.
>
> Thoughts?
>
> --
> Greg Akins
>
> http://insomnia-consulting.org
> http://www.pghcodingdojo.org
> http://pittjug.dev.java.net
> http://twitter.com/akinsgre
> http://www.linkedin.com/in/akinsgre
>
> ---------------------------------------------------------------------
> 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