2
我试图用硒Maven的插件才能使用phantomjs司机从遥控器测试使用的角色枢纽Maven来运行硒服务器,到目前为止我的插件配置是非常简单的:运行硒枢纽行家
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>start-selenium</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start-server</goal>
</goals>
<configuration>
<background>true</background>
</configuration>
</execution>
<execution>
<id>stop-seleniump</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop-server</goal>
</goals>
</execution>
</executions>
</plugin>
然后我使用maven执行插件钩phantomjs:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<phase>pre-integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>phantomjs</executable>
<arguments>
<argument>--webdriver=8080</argument>
<argument>--webdriver-selenium-grid-hub=http://localhost:4444</argument>
</arguments>
</configuration>
</plugin>
利用这种结构的输出是:HTTP ERROR: 403 Forbidden for Proxy
,我不能再往前走。任何人都已成功配置此?
我决定采取不同的方法来运行phantomjs的硒测试。但是,如果有人能够回答这个问题,那将是非常酷的,因为我认为这可能是一种更有效的处理集成测试的优雅方式。 – jspboix 2013-03-07 09:31:45