0
我有一个使用TestNG的基本测试。当我使用invocationcount = 2,threadpoolsize = 2(仅用于测试)运行测试时,我可以在intellij中看到测试正在运行,但只有一个浏览器打开。Java - Fluentlenium如何使用1种方法的线程运行TestNG
继承人我的代码:
public class GoogleTesting extends FluentTestNg {
// Defines the Driver
public WebDriver driver = new ChromeDriver();
@Override
public WebDriver newWebDriver() {
return driver;
}
@Test(invocationCount = 2, threadPoolSize = 2)
public void GoogleTest(){
goTo("http://google.com");
System.out.println(getCookies());
}
}
任何人都知道如何解决这一问题?
因为您只打开一个浏览器窗口...将驱动程序初始化移入测试方法并检查 – Grasshopper