【发布时间】:2018-06-09 06:45:50
【问题描述】:
我正在使用带有节点 8.9.3 和 npm 5.6.0 的最新量角器版本 5.2.2 我有大约 30 个测试套件,每个套件都有大约 150 个测试用例。 它们都在我的本地运行良好,但是当我使用 grunt 在具有 Windows 和完全相同的节点和量角器版本的 Jenkins 机器上运行它们时,我随机收到以下错误并且执行卡住,直到我终止 Jenkins 作业。
(node:3060) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TimeoutError: timeout
(Session info: chrome=63.0.3239.84)
(Driver info: chromedriver=2.34.522940
(1a76f96f66e3ca7b8e57d503b4dd3bccfba87af1),platform=Windows NT 6.3.9600 x86_64)
(node:3060) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:3060) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)
A Jasmine spec timed out. Resetting the WebDriver Control Flow.
失败是随机发生的,而不是在某个测试用例之后发生的。所以有时它只会在开始时失败,有时会在中间失败,有时会在最后一个测试用例上失败。
我尝试过同时使用 seleniumAddress 和 direcConnect 但同样的问题。 这浪费了我很多时间,但仍然停留在我开始的地方。 在这里的任何帮助将不胜感激。
【问题讨论】:
标签: node.js jenkins selenium-webdriver gruntjs protractor