简体   繁体   English

Cypress 在多项测试中冻结

[英]Cypress freezing on multiple tests

When I run a suite of tests, Cypress is freezing on some tests.当我运行一套测试时,赛普拉斯在某些测试上冻结了。 Different tests every time.每次测试都不一样。 At first I thought it was just tests that for some reason might take a while to run (like something that involves a timeout) but that doesn't seem to be the case.起初我认为这只是出于某种原因可能需要一段时间才能运行的测试(例如涉及超时的事情),但事实并非如此。 Running an individual test, with describe.only or it.only , does not freeze.使用describe.onlyit.only运行单个测试不会冻结。 Behavior is the same with cypress run in the command line.行为与命令行中的cypress run相同。

When the test freezes, the spinner by the test in the Cypress pane still spins, but the app's UI is frozen -- for instance when my app's UI shows a spinner that spinner is frozen.当测试冻结时,赛普拉斯窗格中测试的微调器仍然旋转,但应用程序的 UI 被冻结——例如,当我的应用程序的 UI 显示微调器被冻结时。 Sometimes it even freezes on the VISIT / part of the test, before it even gets to any of the stuff that takes longer.有时它甚至会在VISIT /部分测试中冻结,甚至在它到达任何需要更长时间的东西之前。 Freezing happens in different spots, sometimes on different tests, on different cypress runs.冻结发生在不同的地点,有时在不同的测试中,在不同的柏树运行中。

Also, even when a test file runs to completion, sometimes the Cypress UI (like the stop button at the top) doesn't respond.此外,即使测试文件运行完成,有时赛普拉斯 UI(如顶部的停止按钮)也不会响应。

This only started happening Friday, possibly coinciding with an update to 3.8.1.这仅在周五开始发生,可能与 3.8.1 的更新同时发生。 I've tried using 3.7.0 again, with no change.我再次尝试使用 3.7.0,没有任何变化。

Is anyone else experiencing this?有没有其他人遇到过这种情况? I'm running on Windows 10 and the app is ReactJS.我在 Windows 10 上运行,应用程序是 ReactJS。

If you are running Linux there is a bug related to Chrome 79 that freezes Cypress.如果您运行的是 Linux,则有一个与 Chrome 79 相关的错误会冻结 Cypress。 Check here for more info: https://support.google.com/chrome/thread/24842699?hl=en在此处查看更多信息: https : //support.google.com/chrome/thread/24842699?hl=en

You can also update to latest Chrome version您还可以更新到最新的 Chrome 版本

How the problem was finally resolved ?问题最后是怎么解决的?

I encounter same problem but for some reason load event does not trigger even after 60.000ms;我遇到了同样的问题,但由于某种原因,即使在 60.000 毫秒之后加载事件也不会触发; - I test app on different resolutions and sometimes, app doesn't load in some resolutions. - 我在不同的分辨率下测试应用程序,有时,应用程序在某些分辨率下无法加载。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM