Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Electron slows down dramatically when tests are run multiple times #5018

Closed
marinakuranda opened this issue Aug 21, 2019 · 2 comments
Closed

Comments

@marinakuranda
Copy link

It's a bug

Current behavior:

When I run the same test 200 times in Electron, both headless and headed, at some point tests start to drag. This usually happens after 100~ runs, with every test it takes longer and longer before the timeout and a failure.
A really short simple test like for example just opening a page will not slow down.
But a reasonably simple test that consists of about 50 lines will.
Tested on different tests and environments, so the issue is not isolated to the setup.
Everything works just fine in headed Chrome (not to confuse with GUI, which is not intended for longer runs, see comments in #431 )

Mostly concerned about Electron headless mode rather than headed, as Electron is the only available browser for the headless currently. (#832 is still open as of now)

Desired behavior:

Tests should not slow down in headless Electron when run multiple times.

Steps to reproduce: (app code and test code)

Run the test "pdp-mobile.spec.js" via npm run open, it will run for 200 times.
See that the initial run time per test is about 15 sec.
Screenshot from 2019-08-21 16-08-27

See that around the 150th time the test starts to slow down drastically, reaching the run time per test up to almost 4 min.
Screenshot from 2019-08-21 16-10-41

Once the test starts to slow down, only a very generous defaultCommandTimeout of 20 sec is enough to stop the tests from failing due to the timing out.

Link to the repository: https://github.com/marinakuranda/cypress-bug-example

Versions

Cypress 3.4.1
OS Linux Manjaro, also reproduced on Windows 7.
The issue is isolated to Electron, when run in Chrome all is ok.

@joskoskilj
Copy link

Any updates on this?

@jennifer-shehane
Copy link
Member

This example is not reproducible as is. The url visiting 404s. Although I suspect it has something to do with this performance issue or something similar that we've seen with multiple Cypress commands in a single test. #6783

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants