我们正在努力使我们的Protractor E2E测试稳定,因此我们的开发和部署流程可以依赖于它。 但是,到目前为止,我们还无法完全稳定地进行E2E测试。
有时,由于selenium-webdriver中的ClientRequest中的ETIMEDOUT导致某些测试失败,因此不一致。
Failed: ETIMEDOUT connect ETIMEDOUT 5.255.93.10:80
Stack:
Error: ETIMEDOUT connect ETIMEDOUT 5.255.93.10:80
at ClientRequest.<anonymous> (/var/lib/jenkins/workspace/HPS UI E2E Tests/node_modules/grunt-protractor-runner/node_modules/selenium-webdriver/http/index.js:365:15)
at emitOne (events.js:90:13)
at ClientRequest.emit (events.js:182:7)
at Socket.socketErrorListener (_http_client.js:306:9)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at emitErrorNT (net.js:1265:8)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
From: Task: WebDriver.findElements(By(css selector, *[id="chart_doubleSlider_brush"]))
at WebDriver.schedule (/var/lib/jenkins/workspace/HPS UI E2E Tests/node_modules/grunt-protractor-runner/node_modules/selenium-webdriver/lib/webdriver.js:344:17)
at WebDriver.findElements (/var/lib/jenkins/workspace/HPS UI E2E Tests/node_modules/grunt-protractor-runner/node_modules/selenium-webdriver/lib/webdriver.js:897:22)
at /var/lib/jenkins/workspace/HPS UI E2E Tests/node_modules/grunt-protractor-runner/node_modules/protractor/built/element.js:141:44
at Promise.invokeCallback_ (/var/lib/jenkins/workspace/HPS UI E2E Tests/node_modules/grunt-protractor-runner/node_modules/selenium-webdriver/lib/promise.js:1329:14)
at TaskQueue.execute_ (/var/lib/jenkins/workspace/HPS UI E2E Tests/node_modules/grunt-protractor-runner/node_modules/selenium-webdriver/lib/promise.js:2790:14)
at TaskQueue.executeNext_ (/var/lib/jenkins/workspace/HPS UI E2E Tests/node_modules/grunt-protractor-runner/node_modules/selenium-webdriver/lib/promise.js:2773:21)
at /var/lib/jenkins/workspace/HPS UI E2E Tests/node_modules/grunt-protractor-runner/node_modules/selenium-webdriver/lib/promise.js:2652:27
at /var/lib/jenkins/workspace/HPS UI E2E Tests/node_modules/grunt-protractor-runner/node_modules/selenium-webdriver/lib/promise.js:639:7
at process._tickCallback (internal/process/next_tick.js:103:7)
我们希望有一种方法来稳定此测试,例如在Protractor运行中使用某种重试机制,或者在低级别上使用失败的http请求的重试机制。目前,我们还没有找到任何解决方案。
有关我们设置的更多信息:
我们希望听到您关于如何稳定量角器测试的建议。