我有一个内部使用Cucumber-jvm的maven测试项目。我想使用Selenium-Grid 2.0并行运行我的功能文件。
我已经启动了集线器和节点,但当我运行测试时。它只在一个chrome实例中按顺序运行测试。虽然我可以在我的集线器上看到4个chrome实例。
下面是我的@Before挂钩。
@Before
public void beforeScenario() throws Exception{
//grid code
DesiredCapabilities cap = new DesiredCapabilities();
cap.setBrowserName("chrome");
cap.setPlatform(Platform.MAC);
cap.setCapability("version", "41");
driver = new RemoteWebDriver(
new URL("http://localhost:4444/wd/hub"),
cap);
endUser.is_the_login_page();
}一些帮助将是有用的。谢谢
发布于 2015-04-01 04:27:32
您使用的是一个Test类还是多个Test类?一个测试类将以单线程方式运行。这样就可以重复使用。如果您:
<代码>F29
然后,您应该看到您的测试同时在两个容器中运行。
发布于 2015-04-07 17:33:19
这应该可以通过surefire插件来实现:http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html
https://stackoverflow.com/questions/29345477
复制相似问题