-
Notifications
You must be signed in to change notification settings - Fork 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
Playwright: run tests headlessly. #56475
Conversation
Link to Calypso live: https://calypso.live?image=registry.a8c.com/calypso/app:build-15458 |
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
872fd01
to
6cc3e32
Compare
To be honest, I am not sure if the headless tests are any faster in CI. TeamCity makes it difficult to run multiple runs of the same task, so I've manually triggered a few instances to evaluate execution speed: desktop
mobile
It appears that this is faster than the On mobile, it is a similar story where |
Given the (admittedly small sample size of) data above, I think it is worth trying to run our tests headlessly for a gain of approx. 17%. |
Interesting! Does it still capture screenshots and video recordings? Doc for Chrome suggests we can drop Xvfb (https://developers.google.com/web/updates/2017/04/headless-chrome#faq) |
It should - it does locally, but CI may behave differently. I will introduce some failures intentionally to see if it behaves as expected.
Great, I will also take a look in subsequent commits. |
Drop xvfb-run.
Wow, that's a pretty huge gain! This is awesome, thanks for looking into this @worldomonation! 😄 |
xvfb can be dropped and artifacts are saved! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Excited to see things are getting faster with this PR!
This reverts commit afb0a71.
Looks like I broke the e2e tests with this merge. Not sure why that is, especially since all e2e tests passed in the branch. Revert is prepped at #56679. |
Changes proposed in this Pull Request
This PR proposes to run Playwright tests headlessly.
By some accounts, Playwright runs faster in headless mode GitHub.
Anecdotally, running a selection of test specs locally with both headful and headless modes show some difference:
Headless:
Headful:
Testing instructions