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/10/07 15:11:41 UTC

Selenium Plugin

Is anyone using the Selenium plugin?

I'd like to use the selenese goal to run html test suites; but haven't
had any success getting it to work.

The plugin documentation recommends using JUnit to run Selenium tests
with the normal surefire plugin.  In that case, I'm not sure of the
point of the Selenium plugin.

Can anyone point me in the right direction?

-- 
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: Selenium Plugin

Posted by Antonio Petrelli <an...@gmail.com>.
2010/10/7 Greg Akins <an...@gmail.com>:
> On Thu, Oct 7, 2010 at 9:37 AM, Antonio Petrelli
> <an...@gmail.com> wrote:
>
>> Just to be clear, Tiles test webapp uses the "selenese" goal that runs
>> HTML Selenese tests, as you wanted.
>> Notice that JUnit suggestion is only valid if you are using pure Java
>> commands, using Selenium RC.
>> In case of Tiles test webapp, Surefire is configured to run
>> integration tests (not unit tests), however I suggest using Failsafe
>> for this purpose.
>>
>
> Thanks for clarifying that.  I'm not familiar with Failsafe, is it
> used instead of Surefire, or in addition to Surefire?

In addition. Failsafe[1] focuses on integration testing, Surefire on
unit testing. Those are different Maven phases. About functionality,
they are basically the same.
IOW you run unit tests and, after they pass, run integration tests
(with container start/stop and other needed stuff).

Antonio

[1] http://maven.apache.org/plugins/maven-failsafe-plugin/

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


Re: Selenium Plugin

Posted by Greg Akins <an...@gmail.com>.
On Thu, Oct 7, 2010 at 9:37 AM, Antonio Petrelli
<an...@gmail.com> wrote:

> Just to be clear, Tiles test webapp uses the "selenese" goal that runs
> HTML Selenese tests, as you wanted.
> Notice that JUnit suggestion is only valid if you are using pure Java
> commands, using Selenium RC.
> In case of Tiles test webapp, Surefire is configured to run
> integration tests (not unit tests), however I suggest using Failsafe
> for this purpose.
>

Thanks for clarifying that.  I'm not familiar with Failsafe, is it
used instead of Surefire, or in addition to Surefire?

-- 
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: Use properties to get name of dependency...

Posted by Wayne Fay <wa...@gmail.com>.
> Is is possible to use properties to get the final name of an artifact produced
> by a dependency?

Not that I'm aware of. Unless you're using properties in the
<dependency> declaration, which you could reuse somewhere else in the
pom.

>  How do I do this?

Why do you need to do this?

Wayne

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


Re: Use properties to get name of dependency...

Posted by Brian Fox <br...@infinity.nu>.
Once something is deployed to a repo, the finalName has no effect
because the name of the file in the repo is part of the layout
standard. FinalName only affects the jar/war etc that gets created in
the /target folder.

Soooo, that means you can always know what the name of the dependency
file is, it's [artifactid-version[-classifier].ext]

On Thu, Oct 7, 2010 at 10:03 AM, Michael Remijan <mj...@yahoo.com> wrote:
> I know I can use properties like ${project.build.finalName} to get some
> information from the POM.  But the information I want to get is the final name
> of the artifact built by a dependency.  So, for example suppose I have a
> dependency like this:
>
>  <dependencies>
>      <dependency>
>          <groupId>com.somecompany</groupId>
>          <artifactId>super-project</artifactId>
>          <version>1.2.2</version>
>          <type>jar</type>
>      </dependency>
>  </dependencies>
>
> I have tried to get the final name of the artifact this dependency produces by
> using a property like this:
>
>  ${project.dependencies.0.artifactId}-${project.dependencies.0.version}.jar
>
> But this is not working.  So two questions:
>
> (1)
> Is is possible to use properties to get the final name of an artifact produced
> by a dependency?
>
> (2)
>  How do I do this?

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


Use properties to get name of dependency...

Posted by Michael Remijan <mj...@yahoo.com>.
I know I can use properties like ${project.build.finalName} to get some 
information from the POM.  But the information I want to get is the final name 
of the artifact built by a dependency.  So, for example suppose I have a 
dependency like this:

  <dependencies>
      <dependency>
          <groupId>com.somecompany</groupId>
          <artifactId>super-project</artifactId>
          <version>1.2.2</version>
          <type>jar</type>
      </dependency>
  </dependencies>

I have tried to get the final name of the artifact this dependency produces by 
using a property like this:

  ${project.dependencies.0.artifactId}-${project.dependencies.0.version}.jar

But this is not working.  So two questions:

(1) 
Is is possible to use properties to get the final name of an artifact produced 
by a dependency?

(2)
 How do I do this?

Re: Selenium Plugin

Posted by Antonio Petrelli <an...@gmail.com>.
2010/10/7 Greg Akins <an...@gmail.com>:
> Just not clear how the plugin fits in.  I'll look at the Tiles tests
> to get a better idea.

Just to be clear, Tiles test webapp uses the "selenese" goal that runs
HTML Selenese tests, as you wanted.
Notice that JUnit suggestion is only valid if you are using pure Java
commands, using Selenium RC.
In case of Tiles test webapp, Surefire is configured to run
integration tests (not unit tests), however I suggest using Failsafe
for this purpose.

Antonio

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


Re: Selenium Plugin

Posted by Greg Akins <an...@gmail.com>.
Thanks Todd and Antonio

I've used Selenium tests before, so I know the basic mechanism

Just not clear how the plugin fits in.  I'll look at the Tiles tests
to get a better idea.

On Thu, Oct 7, 2010 at 9:20 AM, Thiessen, Todd (Todd)
<tt...@avaya.com> wrote:
> Yes. We use it very extensively. Works great. I found the docs to be fairly adequate. We write all our Selenium tests using junit.
>
> Make sure you get the Selenium IDE plugin for firefox. It will greatly help you write your junit tests.
>
> The Maven plugin for Selenium start the selenium-rc (I think remote control) server. That server I believe emulates all the mouse clicks that a human would do. So in your junit tests you will have something like:
>
> selenium.click("ok-button-id");
>
> The selenium IDE will create this text for you. You just have to put them into your junit tests.
>
>> -----Original Message-----
>> From: Greg Akins [mailto:angrygreg@gmail.com]
>> Sent: Thursday, October 07, 2010 9:12 AM
>> To: Maven Users List
>> Subject: Selenium Plugin
>>
>> Is anyone using the Selenium plugin?
>>
>> I'd like to use the selenese goal to run html test suites; but haven't
>> had any success getting it to work.
>>
>> The plugin documentation recommends using JUnit to run Selenium tests
>> with the normal surefire plugin.  In that case, I'm not sure of the
>> point of the Selenium plugin.
>>
>> Can anyone point me in the right direction?
>>
>> --
>> 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: Selenium Plugin

Posted by "Thiessen, Todd (Todd)" <tt...@avaya.com>.
Yes. We use it very extensively. Works great. I found the docs to be fairly adequate. We write all our Selenium tests using junit.

Make sure you get the Selenium IDE plugin for firefox. It will greatly help you write your junit tests.

The Maven plugin for Selenium start the selenium-rc (I think remote control) server. That server I believe emulates all the mouse clicks that a human would do. So in your junit tests you will have something like:

selenium.click("ok-button-id");

The selenium IDE will create this text for you. You just have to put them into your junit tests.

> -----Original Message-----
> From: Greg Akins [mailto:angrygreg@gmail.com]
> Sent: Thursday, October 07, 2010 9:12 AM
> To: Maven Users List
> Subject: Selenium Plugin
> 
> Is anyone using the Selenium plugin?
> 
> I'd like to use the selenese goal to run html test suites; but haven't
> had any success getting it to work.
> 
> The plugin documentation recommends using JUnit to run Selenium tests
> with the normal surefire plugin.  In that case, I'm not sure of the
> point of the Selenium plugin.
> 
> Can anyone point me in the right direction?
> 
> --
> 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


Re: Selenium Plugin

Posted by Antonio Petrelli <an...@gmail.com>.
2010/10/7 Greg Akins <an...@gmail.com>:
> Is anyone using the Selenium plugin?
>
> I'd like to use the selenese goal to run html test suites; but haven't
> had any success getting it to work.

Tiles test webapp is connected to Selenium HTML Selenese tests.
It starts the container (Tomcat), runs the tests and stops the container:

Checkout this:
http://svn.eu.apache.org/repos/asf/tiles/framework/trunk/
do a mvn install, then go in:
tiles-test-pom/tiles-test
and run:
mvn verify -Prun-selenium -Dcargo.tomcat6x.home=<your_tomcat_home>
It should work on any container, anyway.

HTH
Antonio

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