-
Notifications
You must be signed in to change notification settings - Fork 10.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
Improve E2E tests performance #56127
base: main
Are you sure you want to change the base?
Conversation
Speed: so far it's not faster, like 10 minutes slower than a good run. Another aspect to take into account is the stability that the PR adds for local runs (dangling chrome instances), but this may be something that could be ignored if these are never run locally. |
These tests are definitely run locally. It's been a while and I don't remember the exact details of how this worked, but we passed in a GUID so that chrome created a separate profile because it affected some tests that we had. I've seen the chrome instances problem you are referring to (and I've usually just killed the instances after the test run). Is there a way we can kill the instances "earlier" and ensure we maintain the isolation with the separate profiles? |
This PR ;) It provides the same behavior as with the Guid, new instances, but by using a guid (instead of |
Thanks for proposing this, @sebastienros. In terms of priorities:
It's not an easy call to make because we probably don't want to run in two different modes (local vs CI) as then we'll get more CI-only failures. |
@sebastienros is this still something we want to push for, or should we close it. |
@javiercn I think the changes are simple, so as long as the tests are still passing I don't see why we could not apply them if they improve the time it takes to run tests. I won't spend the time on syncing it with main though if others prefer not to touch this part of the code. |
Fixes #56004
Without this PR the chrome instances are referenced indefinitely until the test fixture is disposed.
The PR replaces GUIDs that were used to get a fresh browser by
null
to note that the Browser should not be reused instead. And then when the test class is disposed the Browser is disposed. This limits the number of dangling chrome instances which accumulate overtime and slow down the machine (each instance takes 10% of cpu continuously on my machine, even after the test)