Snapshotting still occurs when numTestsKeptInMemory is 0
See original GitHub issueCurrent behavior:
When running cypress in GUI mode with numTestsKeptInMemory
set to 0
, snapshotting still occurs even though none of them should be kept in memory. This has a negative impact on performance and memory consumption.
In this screenshot, you can see that numTestsKeptInMemory
is 0
, but 5 seconds is spent taking snapshots that will not be used.
In this screenshot you can see where the majority of the snapshot execution took place, 3.4s converting rules from large stylesheets into a string, and 0.4s replacing URLs in those strings with absolute paths.
Desired behavior:
When running with numTestsKeptInMemory
set to 0
, snapshotting should be avoided in the same way that occurs while running in headless mode.
Steps to reproduce:
- Set
numTestsKeptInMemory
to0
. - Run cypress GUI mode.
Versions
Cypress: 3.2.0 Chrome: Chrome 74
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
cypress-io/cypress - Gitter
well setting numTestsKeptInMemory to 0 will prevent the snapshot from being stored... but there could be many other things that consume memory. sun-stream....
Read more >Cypress long automation script crashes the Chrome browser ...
At 0 you will not get any DOM snapshots. The memory usage will still climb, but it will climb at a much slower...
Read more >Configurations in Cypress and How to Disable Default ...
numTestsKeptInMemory, 50, This configuration specifies the number of tests for which we keep the snapshots and the command data in memory.
Read more >Configuration - Cypress Documentation
numTestsKeptInMemory, 50, The number of tests for which snapshots and command ... between 0 and 51 , where a lower value results in...
Read more >Scheduled & distributed Cypress tests for multiple ... - habx
baseUrl}} numTestsKeptInMemory=0 ... We still had bugs that did occur in production, mostly because of a different set of data, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll take this PR from here and we’ll get it out in the next patch release or so.
Hey @CoryDanielson, can you take a look at your resolved configuration and confirm that the
numTestsKeptInMemory
configuration is being read as set to0
? https://on.cypress.io/configuration#Resolved-Configuration