-
-
Notifications
You must be signed in to change notification settings - Fork 719
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
[investigate] Replace Puppeteer with Playwright (Vitest Browser Mode?) #4949
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4949 +/- ##
===========================================
- Coverage 90.48% 71.81% -18.68%
===========================================
Files 265 265
Lines 38113 38113
Branches 3166 2607 -559
===========================================
- Hits 34488 27372 -7116
- Misses 2650 9490 +6840
- Partials 975 1251 +276 ☔ View full report in Codecov by Sentry. |
Looks like a good direction, let's make sure the coverage is working as expected as I had to fight with it back then... |
@HarelM , how to I check the coverage? is it specific to the render test suite? |
If this is only a refactoring, the coverage should stay the same between main branch and this one. |
It seems like the render tests take 2.5x longer to run with the current state of this PR (26 min. vs ~ 11 min), so that has to be reduced significantly before this PR can be merged. |
Yes, that's a concern... |
The performance overhead appear to come from improved isolation / cross-browser architecture with some abstractions layers - it just is a bit steep price. I'll revisit this when the vitest browser mode is stable, as it might bring forward some options for performance improvements: |
The test suite for Integration / Unit is now Vitest. That means we can explore Vitest Browser Mode for render tests - if it's helping on the perf issues with playwright: |
Ongoing work on improving the test suite.
Initially we had Selenium in Query / Browser suite, and custom mocks of webgl1 in Render suite.
February 2022 - Browser, Query: Selenium to Playwright
May 8th 2023 - Browser, Query: Playwright to Puppeteer
Google chrome made a splash. Until this point headless and headful chrome were two different browsers, and now they cleaned it up so the headless became a "real chrome", which is a lot better. Only puppeteer supported this initially, so we switched to be able to leverage it in (query + browser):
May 9th 2023 - Render: Custom Webgl1 Mocks to Puppeteer:
Now - Browser, Query, Render: Puppeteer to Playwright
This is now old history, and since, playwright has due to a nicer dx, and multi-browser support (firefox / webkit / chromium), managed to become the No. 1 browser runner, and it's possible to it thoughout.
As an example of the better DX, this is i.e. a diff from browser.test.ts:
Puppeteer:
Playwright:
Rendet test HTML reporting works - here a full run on a mac.
Launch Checklist