ng e2e --headless from @cypress/schematic uses significantly more RAM than looping over single files with ng e2e --headless --spec mySingleTestFile #29017
Labels
stage: needs investigating
Someone from Cypress needs to look at this
stale
no activity on this issue for a long period
type: performance 🏃♀️
Performance related
Test code to reproduce
No test code available, as it should not be a code problem.
Cypress Mode
cypress run
Cypress Version
13.5.x
Browser Version
121 headless
Node version
18.19.1, npm 10.2.4
Operating System
Linux, CPU amd64
Memory Debug Logs
No response
Other
We are running our e2e tests on a Microsoft Hosted Agent pool. Since a while, we were having issues with cancelled pipeline runs - all out of a sudden, and having no logs because the agents just weren't reachable anymore.
By storing logs every minute to a hosted storage box, I found out that the machine is running out of RAM. Swap has 4096 MiB, of which 0.0 is free, shortly before the meltdown. Memory has 6922 MiB in total, of which 132.3 was free.
We solved the problem now by iterating over our feature files and running them single - and sooner or later probably establishing self-hosted agents. But what worries me: Theoretically, there should be no difference, at least not from my understanding - but there is. Why is the memory consumption so high that the machine crashes? And how big would the RAM need to be that it is able to run the tests all in one go? At the moment, my local machine is sufficient, but for how long will that be the case, and might there even be a single test using all memory? We are planning to have more e2e tests in the future, and the length of them is hard to restrict in most cases because of the feature complexity.
One thing that I could observe was that there were several chrome instances open, although we don't run in parallel.
Do you have any hint towards that problem?
More info on the test setup:
We are using "@badeball/cypress-cucumber-preprocessor", and the above mentioned "@cypress-schematic".
Settings-wise, we have video set to true, videoCompression true, watchForFileChanges false and trashAssetsBeforeRuns set to true, numTestsKeptInMemory is 0.
The text was updated successfully, but these errors were encountered: