【发布时间】:2019-01-24 00:13:52
【问题描述】:
我正在为我的 selenium 测试用例使用 sauce Lab 驱动程序。在我的一个测试用例中,在继续其余步骤之前,我需要让该过程进行 1 分钟的睡眠。而且我看到这种情况下随机失败的百分比要高得多,消息如下:
The test with session id ... has already finished, and can't receive further commands...
是不是因为运行时间太长,并且会话由 sauce-lab 超时?
通常我有几十个测试用例以单线程方式运行,每个测试类都自己处理驱动程序,例如:
public class TestASuite extends TestBase {
@BeforeClass(alwaysRun=true)
public void setup(...) {
// driver starts here...
}
@AfterClass(alwaysRun = true)
public void closeSession(ITestContext test) {
// driver ends here
}
public void testCase1(){}
....
}
【问题讨论】:
标签: selenium selenium-webdriver automation selenium-chromedriver saucelabs