четверг, 8 апреля 2010 г.

Working around a Selenium Maven plugin problem on Firefox 3

A couple of days ago I tried Spring Roo. Its ten-minute tutorial offers you to run Selenium tests using the following command:
mvn selenium:selenese
I launched it, but console window freezed and nothing happened.
Looks like it's a problem with Selenium+Firefox 3 (possibly also Ubuntu).
For me, a solution was simple: just change selenium-maven-plugin version to 1.0.1 (which is the most recent stable version at the time of writing). So plugin definition in Roo-generated application's pom.xml will look like
<plugin>
   <groupid>org.codehaus.mojo</groupid>
   <artifactid>selenium-maven-plugin</artifactid>
   <version>1.0.1</version>
   <configuration>
     <suite>src/main/webapp/selenium/test-suite.xhtml</suite>
     <browser>*firefox</browser>
     <results>${project.build.directory}/target/selenium.txt</results>
     <starturl>http://localhost:4444/</starturl>
   </configuration>
</plugin>
The same applies to using Selenium on Ubuntu+Firefox 3 through JUnit tests: I had to use version 1.0.1 of selenium-maven-plugin to make this work.

Комментариев нет:

Отправить комментарий