我正在AzureDevOps
CI / CD中运行赛普拉斯UI测试,并且大多数UI测试失败了。几天前,所有测试都运行良好。
它抛出Timed out waiting for the browser to connect. Retrying.
错误:有关如何解决此问题的任何建议。
环境详细信息: 赛普拉斯版本:3.4.1, 节点:10.x, Azure DevOps CI / CD
Running: report/send-report.spec.js... (12 of 14)
2019-10-10T00:47:31.0294852Z
2019-10-10T00:47:31.0295427Z Warning: Cypress can only record videos when using the built in 'electron' browser.
2019-10-10T00:47:31.0295707Z
2019-10-10T00:47:31.0296579Z You have set the browser to: 'chrome'
2019-10-10T00:47:31.0296837Z
2019-10-10T00:47:31.0297613Z A video will not be recorded when using this browser.
2019-10-10T00:47:31.0313740Z (node:4030) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 end listeners added. Use emitter.setMaxListeners() to increase limit
2019-10-10T00:48:01.0316223Z
2019-10-10T00:48:01.0592004Z Timed out waiting for the browser to connect. Retrying...
2019-10-10T00:48:31.0587550Z
2019-10-10T00:48:31.0839142Z Timed out waiting for the browser to connect. Retrying again...
2019-10-10T00:49:01.0877330Z
2019-10-10T00:49:01.1241198Z The browser never connected. Something is wrong. The tests cannot run. Aborting...
答案 0 :(得分:0)
我注意到您已将重试值设置为2,以启用失败时立即重试,而不是继续进行下一个测试。因此,我建议您更改该值并检查错误是否仍然出现。
您可以尝试另一种解决方法,将numTestsKeptInMemory
从50更改为1
或0
等理智的东西。这是官方文档。 https://docs.cypress.io/guides/references/configuration.html#Global
此外,这似乎是偶发性错误。因为某些用户在第一个管道上失败,但是在第二个管道上成功。这可能是赛普拉斯本身或系统内存的问题,您可以直接向赛普拉斯报告此问题。
这是有关cypress-io / cypress的链接。 https://github.com/cypress-io/cypress/issues/
这是有关同一错误消息的链接。https://github.com/cypress-io/cypress/issues/1305