Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore: add firefox-asan for stress tests (#24049)
Andrey Lushnikov1fdd7541e05d
diff --git a/.github/workflows/tests_stress.yml b/.github/workflows/tests_stress.ymlindex 20cd7dff7c..bebf024835 100644--- a/.github/workflows/tests_stress.yml+++ b/.github/workflows/tests_stress.yml@@ -33,6 +33,8 @@ jobs:- run: npm ci- run: npm run build- run: npx playwright install --with-deps+ - run: npx playwright install firefox-asan+ if: matrix.os != 'windows-latest'- run: npm run stest contexts -- --project=chromiumif: always()- run: npm run stest browsers -- --project=chromiumdiff --git a/packages/playwright-core/browsers.json b/packages/playwright-core/browsers.jsonindex 73fbc9ed4f..e17e224731 100644--- a/packages/playwright-core/browsers.json+++ b/packages/playwright-core/browsers.json@@ -25,6 +25,12 @@"installByDefault": true,"browserVersion": "115.0"},+ {+ "name": "firefox-asan",+ "revision": "1420",+ "installByDefault": false,+ "browserVersion": "115.0"+ },{"name": "firefox-beta","revision": "1420",diff --git a/packages/playwright-core/src/server/registry/index.ts b/packages/playwright-core/src/server/registry/index.tsindex 307e70d469..22a21ce88f 100644--- a/packages/playwright-core/src/server/registry/index.ts+++ b/packages/playwright-core/src/server/registry/index.ts@@ -199,6 +199,29 @@ const DOWNLOAD_PATHS = {'mac13-arm64': 'builds/firefox-beta/%s/firefox-beta-mac-13-arm64.zip','win64': 'builds/firefox-beta/%s/firefox-beta-win64.zip',},+ 'firefox-asan': {+ '<unknown>': undefined,+ 'generic-linux': 'builds/firefox/%s/firefox-asan-ubuntu-20.04.zip',+ 'generic-linux-arm64': undefined,+ 'ubuntu18.04': undefined,+ 'ubuntu20.04': undefined,+ 'ubuntu22.04': 'builds/firefox/%s/firefox-asan-ubuntu-22.04.zip',+ 'ubuntu18.04-arm64': undefined,+ 'ubuntu20.04-arm64': undefined,+ 'ubuntu22.04-arm64': undefined,+ 'debian11': undefined,+ 'debian11-arm64': undefined,+ 'mac10.13': 'builds/firefox/%s/firefox-asan-mac-13.zip',+ 'mac10.14': 'builds/firefox/%s/firefox-asan-mac-13.zip',+ 'mac10.15': 'builds/firefox/%s/firefox-asan-mac-13.zip',+ 'mac11': 'builds/firefox/%s/firefox-asan-mac-13.zip',+ 'mac11-arm64': undefined,+ 'mac12': 'builds/firefox/%s/firefox-asan-mac-13.zip',+ 'mac12-arm64': undefined,+ 'mac13': 'builds/firefox/%s/firefox-asan-mac-13.zip',+ 'mac13-arm64': undefined,+ 'win64': undefined,+ },'webkit': {'<unknown>': undefined,'generic-linux': 'builds/webkit/%s/webkit-ubuntu-20.04.zip',@@ -338,7 +361,7 @@ function readDescriptors(browsersJSON: BrowsersJSON) {}export type BrowserName = 'chromium' | 'firefox' | 'webkit';-type InternalTool = 'ffmpeg' | 'firefox-beta' | 'chromium-with-symbols' | 'chromium-tip-of-tree' | 'android';+type InternalTool = 'ffmpeg' | 'firefox-beta' | 'firefox-asan' | 'chromium-with-symbols' | 'chromium-tip-of-tree' | 'android';type ChromiumChannel = 'chrome' | 'chrome-beta' | 'chrome-dev' | 'chrome-canary' | 'msedge' | 'msedge-beta' | 'msedge-dev' | 'msedge-canary';const allDownloadable = ['chromium', 'firefox', 'webkit', 'ffmpeg', 'firefox-beta', 'chromium-with-symbols', 'chromium-tip-of-tree'];@@ -545,6 +568,24 @@ export class Registry {_isHermeticInstallation: true,});+ const firefoxAsan = descriptors.find(d => d.name === 'firefox-asan')!;+ const firefoxAsanExecutable = findExecutablePath(firefoxAsan.dir, 'firefox');+ this._executables.push({+ type: 'browser',+ name: 'firefox-asan',+ browserName: 'firefox',+ directory: firefoxAsan.dir,+ executablePath: () => firefoxAsanExecutable,+ executablePathOrDie: (sdkLanguage: string) => executablePathOrDie('firefox-asan', firefoxAsanExecutable, firefoxAsan.installByDefault, sdkLanguage),+ installType: firefoxAsan.installByDefault ? 'download-by-default' : 'download-on-demand',+ validateHostRequirements: (sdkLanguage: string) => this._validateHostRequirements(sdkLanguage, 'firefox', firefoxAsan.dir, ['firefox'], [], ['firefox']),+ downloadURLs: this._downloadURLs(firefoxAsan),+ browserVersion: firefoxAsan.browserVersion,+ _install: () => this._downloadExecutable(firefoxAsan, firefoxAsanExecutable),+ _dependencyGroup: 'firefox',+ _isHermeticInstallation: true,+ });+const firefoxBeta = descriptors.find(d => d.name === 'firefox-beta')!;const firefoxBetaExecutable = findExecutablePath(firefoxBeta.dir, 'firefox');this._executables.push({diff --git a/tests/stress/playwright.config.ts b/tests/stress/playwright.config.tsindex 6be54a8a93..fd745fa2b0 100644--- a/tests/stress/playwright.config.ts+++ b/tests/stress/playwright.config.ts@@ -30,7 +30,8 @@ export default defineConfig({{name: 'firefox',use: {- browserName: 'firefox'+ browserName: 'firefox',+ channel: process.platform !== 'win32' ? 'firefox-asan' : undefined,},},diff --git a/utils/roll_browser.js b/utils/roll_browser.jsindex 1521816316..a72a48eab6 100755--- a/utils/roll_browser.js+++ b/utils/roll_browser.js@@ -63,6 +63,8 @@ Example:const descriptors = [browsersJSON.browsers.find(b => b.name === browserName)];if (browserName === 'chromium')descriptors.push(browsersJSON.browsers.find(b => b.name === 'chromium-with-symbols'));+ if (browserName === 'firefox')+ descriptors.push(browsersJSON.browsers.find(b => b.name === 'firefox-asan'));if (!descriptors.every(d => !!d)) {console.log(`Unknown browser "${browserName}"`);