【发布时间】:2011-06-20 22:28:13
【问题描述】:
我正在尝试通过 codehaus 的 Maven-Selenium 插件配置 selenese 命令使用的 selenium 服务器。我试图在插件中创建多个执行,在 pre-integration-test 阶段启动服务器,但没有成功。 selenium-server 只是进入了一个无限循环,监听一个端口。
我想知道是否有办法覆盖/配置 selenese 命令在插件中使用的 selenium-server。请告诉我。
请参阅下面的 POM sn-p。
....
<properties>
<selenium.version>2.0b3</selenium.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
<version>1.1</version>
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium</artifactId>
<version>${selenium.version}</version>
<type>pom</type>
<exclusions>
<!-- prevent ant:ant versus org.apache.ant:ant collision -->
<exclusion>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<executions>
<execution>
<id>Run-Script</id>
<phase>integration-test</phase>
<goals>
<goal>selenese</goal>
</goals>
<configuration>
<browser>*firefox</browser>
<suite>src/test/selenium/html/TestSuite.html</suite>
<startURL>http://localhost:4444/</startURL>
<results>${project.build.directory}/results/${browser.type}-${test.type}-results.html</results>
<port>4444</port>
<timeoutInSeconds>${selenium.server.timeout.seconds}</timeoutInSeconds>
<multiWindow>${multiple.windows}</multiWindow>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
....
谢谢,
胡安
【问题讨论】:
标签: maven-2 maven selenium maven-plugin selenium-webdriver