webdriverio/webdriverio

[💡 Feature]: Reopen Browser upon crash

Open

#10,012 opened on 2023年3月20日

GitHub で見る
 (1 comment) (0 reactions) (0 assignees)JavaScript (6,029 stars) (1,793 forks)batch import
Idea 💡help wanted

説明

Is your feature request related to a problem?

When running my tests, the browser will start timing out for all tests within a suite. I believe it is related to the number of instances I am running and my CPU/Memory, as it occurs after a large amount of tests. In these cases the browser might crash or disconnect. A wdio tool to retry a test if the browser crashes, without timing out each test in the suite, would be ideal.

There is an issue about this on the puppeteer repository as well.

There is a library puppeteer-cluster which may handle these kinds of error cases?

Using 1 instance rather than 2 does not cause this issue. I only want to retry if the browser crashes, not if my test is flakey/does not pass. All tests within a suite will have a message like below:

Error: Timeout of 210000ms exceeded. The execution in the test ..." took too long. Try to reduce the run time or increase your timeout for test specs (https://webdriver.io/docs/timeouts). (C:\Users....js) at createTimeoutError (C:\Users.......node_modules\mocha\lib\errors.js:498:15) at Test.Runnable._timeoutError (C:\Users....node_modules\mocha\lib\runnable.js:431:10) at Timeout. ....workspace\linklive-automation\node_modules\mocha\lib\runnable.js:246:24) at listOnTimeout (node:internal/timers:559:17) at processTimers (node:internal/timers:502:7)

Describe the solution you'd like.

A WDIO tool that will restart a browser if it crashes, and restart the crashed test (ignoring any retry counts set for flakey tests)

Describe alternatives you've considered.

Running 1 instance instead of 2, which doubles my test execution time.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

コントリビューターガイド