Skip to content
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

Perf tests: Playwright is downloading all the browsers #56588

Closed
WunderBart opened this issue Nov 28, 2023 · 3 comments · Fixed by #56594
Closed

Perf tests: Playwright is downloading all the browsers #56588

WunderBart opened this issue Nov 28, 2023 · 3 comments · Fixed by #56594
Assignees
Labels
[Package] Scripts /packages/scripts [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@WunderBart
Copy link
Member

WunderBart commented Nov 28, 2023

Description

We're installing Chromium dependency explicitly for the performance test runner, because it's the only browser we use there. Still, when those tests are being run for the first time in a fresh environment (like CI), the first thing that happens is that all other browsers are being downloaded as well:

> gutenberg@17.1.2 test:performance
> wp-scripts test-playwright --config test/performance/playwright.config.ts post-editor.spec.js

Downloading Firefox 118.0.1 (playwright build v1425) from https://playwright.azureedge.net/builds/firefox/1425/firefox-ubuntu-22.04.zip
Firefox 118.0.1 (playwright build v1425) downloaded to /home/runner/.cache/ms-playwright/firefox-1425

Downloading Webkit 17.4 (playwright build v1921) from https://playwright.azureedge.net/builds/webkit/1921/webkit-ubuntu-22.04.zip
Webkit 17.4 (playwright build v1921) downloaded to /home/runner/.cache/ms-playwright/webkit-1921

@swissspidy @kevin940726 @Mamaduka

Step-by-step reproduction instructions

Try running npm run test:performance in a fresh environment.

@WunderBart WunderBart added the [Type] Bug An existing feature does not function as intended label Nov 28, 2023
@swissspidy
Copy link
Member

We could add a flag to the wp-scripts test-playwright command to not install browsers on the fly.

@Mamaduka
Copy link
Member

We could add a flag to the wp-scripts test-playwright command to not install browsers on the fly.

That or even allow passing browser dependencies explicitly.

We could also speed up the core e2e jobs since they are only testing with Chrome now.

The wp-script code, responsible for checking/installing browser - https://github.com/WordPress/gutenberg/blob/trunk/packages/scripts/scripts/test-playwright.js#L29-L42.

@WunderBart
Copy link
Member Author

Trying something similar to the suggested solution in #56594

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Scripts /packages/scripts [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants