-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Failing tests slow down all following tests, even in headless mode #6881
Comments
I can indeed recreate this behavior. Thank you for providing a clear reproducible example. This happens in 4.3.0 in both Electron and Chrome headless - during Seems to need to have several 4.2.0 - Electron (no failing tests)4.2.0 - Electron (failing tests before)4.2.0 - Electron (all passing tests)3.8.0 does seem to have made the slowdown worse. I can't think of any changes in that version that could have effected this (after experimenting) except perhaps the Electron upgrade which brings me back to this performance issue: #5987 3.7.03.8.0The smallest reproducible case where I could see the timing of the subsequent passing test be effected (basically doubling in time): it('should fail', () => {
for (let i = 0; i < 100; i++) {
cy.request('http://localhost:8080')
.its('body')
}
cy.wrap(null).then(() => {
expect(false).to.be.true;
});
});
it('should not run slow', () => {
expect(true).to.be.true
}) With failing testSkip failing test |
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided. |
This is still an issue with latest version. I've updated the example. |
Hello, I just want to chime in and say I am also facing this exact issue. I have about 84 tests in my application, and if none fail, each test takes about 10 seconds to run. However, if a single test fails, all subsequent tests that run are seemingly exponentially slower -- i.e. they take sometimes 60, even 100 seconds to run, which is 10x longer than they should take. Please do share if there is a solution to this problem, or if there is any other update, as this makes our builds excruciatingly slow to run functional tests... I am on Cypress Thanks so much, cypress is awesome otherwise 😄 |
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided. |
This is still an issue with latest version. I've updated the example. |
Current behavior:
Failing tests consisting of a lot of steps slows down all consecutive tests considerably. For a failing test, the command log for said test will remain open. It consists of quite a lot of markup. Coupled together with the fact that Cypress forces reflow of layout everytime it determines visibility, etc., this absolutely thrashes performance. This problem is present in 3.7.0 and below, but got significantly worse in 3.8.0.
Additionally, the general feel of the interactive UI with a high amount of command logs, is just terrible in terms of responsiveness. Simply hovering over elements is slugish to an unbearable point.
A little background information
During our development, a regression making 6 of 41 tests fail was introduced, as shown below.
Parallel with this, we upgraded to cypress-4.1.0 and observed something unfortunate, shown below. As one can see, the execution time of tests following the failing tests, increased considerable.
We tried re-arranging the tests and moved the failing tests to the end and the effect diminished.
We then moved the failing tests to the beginning and the effect increased.
Desired behavior:
For execution time to not only be consistent, but also low.
Test code to reproduce
A minimal repository illustrating this behavior can be found here.
First, run the tests without any change.
Then enable the skipped tests and watch the execution time increase.
Versions
Cypress v4.2.0, Arch Linux, Electron 80.
The text was updated successfully, but these errors were encountered: