Skip to content

Commit fae5dd9

Browse files
committed
test: switch from PWTEST_BOT_NAME to config.tag
1 parent a41bab5 commit fae5dd9

File tree

11 files changed

+20
-57
lines changed

11 files changed

+20
-57
lines changed

.github/actions/run-test/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ runs:
6161
fi
6262
shell: bash
6363
env:
64-
PWTEST_BOT_NAME: ${{ inputs.bot-name }}
64+
PW_TAG: "@${{ inputs.bot-name }}"
6565
- name: Run tests
6666
if: inputs.shell != 'bash'
6767
run: ${{ inputs.command }}
6868
shell: ${{ inputs.shell }}
6969
env:
70-
PWTEST_BOT_NAME: ${{ inputs.bot-name }}
70+
PW_TAG: "@${{ inputs.bot-name }}"
7171
- name: Azure Login
7272
uses: azure/login@v2
7373
if: ${{ !cancelled() && github.event_name == 'push' && github.repository == 'microsoft/playwright' }}

.github/workflows/tests_primary.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,6 @@ jobs:
141141
test_vscode_extension:
142142
name: VSCode Extension
143143
runs-on: ubuntu-latest
144-
env:
145-
PWTEST_BOT_NAME: "vscode-extension"
146144
steps:
147145
- uses: actions/checkout@v5
148146
- uses: actions/setup-node@v6
@@ -167,12 +165,14 @@ jobs:
167165
- name: Run extension tests
168166
run: npm run test -- --workers=1
169167
working-directory: ./playwright-vscode
168+
env:
169+
PW_TAG: "@vscode-extension"
170170
- name: Upload blob report
171171
if: ${{ !cancelled() }}
172172
uses: ./.github/actions/upload-blob-report
173173
with:
174174
report_dir: playwright-vscode/blob-report
175-
job_name: ${{ env.PWTEST_BOT_NAME }}
175+
job_name: vscode-extension
176176

177177
test_package_installations:
178178
name: "Installation Test ${{ matrix.os }}"

packages/playwright/src/reporters/blob.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export class BlobReporter extends TeleReporterEmitter {
5252
const metadata: BlobReportMetadata = {
5353
version: currentBlobReportVersion,
5454
userAgent: getUserAgent(),
55+
// TODO: remove after some time, recommend config.tag instead.
5556
name: process.env.PWTEST_BOT_NAME,
5657
shard: config.shard ?? undefined,
5758
pathSeparator: path.sep,

packages/web/playwright.config.ts

Lines changed: 0 additions & 45 deletions
This file was deleted.

tests/bidi/playwright.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const reporters = () => {
4444
const result: ReporterDescription[] = process.env.CI ? [
4545
hasDebugOutput ? ['list'] : ['dot'],
4646
['json', { outputFile: path.join(outputDir, 'report.json') }],
47-
['blob', { fileName: `${process.env.PWTEST_BOT_NAME}.zip` }],
47+
['blob'],
4848
['./csvReporter', { outputFile: path.join(outputDir, 'report.csv') }],
4949
] : [
5050
['html', { open: 'on-failure' }],
@@ -60,6 +60,7 @@ const config: Config<PlaywrightWorkerOptions & PlaywrightTestOptions & TestModeW
6060
expect: {
6161
timeout: 10000,
6262
},
63+
tag: process.env.PW_TAG,
6364
maxFailures: 0,
6465
timeout: 15 * 1000,
6566
globalTimeout: 90 * 60 * 1000,

tests/electron/playwright.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ const config: Config<PlaywrightWorkerOptions & PlaywrightTestOptions> = {
4040
['dot'],
4141
['json', { outputFile: path.join(outputDir, 'report.json') }],
4242
// Needed since tests/electron/package.json exists which would otherwise be picked up as tests/electron/ (outputDir)
43-
['blob', { fileName: path.join(__dirname, '../../blob-report/', `${process.env.PWTEST_BOT_NAME}.zip`) }],
43+
['blob', { outputDir: path.resolve(__dirname, '../../blob-report') }],
4444
] : 'line',
45+
tag: process.env.PW_TAG,
4546
projects: [],
4647
globalSetup: './globalSetup.ts'
4748
};

tests/installation/playwright.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const reporters = () => {
2424
const result: ReporterDescription[] = process.env.CI ? [
2525
['dot'],
2626
['json', { outputFile: path.join(outputDir, 'report.json') }],
27-
['blob', { fileName: `${process.env.PWTEST_BOT_NAME}.zip` }],
27+
['blob'],
2828
] : [
2929
['list'],
3030
['html', { open: 'on-failure' }]
@@ -40,6 +40,7 @@ export default defineConfig({
4040
timeout: 5 * 60 * 1000,
4141
retries: process.env.CI ? 3 : 0,
4242
reporter: reporters(),
43+
tag: process.env.PW_TAG,
4344
forbidOnly: !!process.env.CI,
4445
workers: 1,
4546
projects: [

tests/library/playwright.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const reporters = () => {
4646
const result: ReporterDescription[] = process.env.CI ? [
4747
['dot'],
4848
['json', { outputFile: path.join(outputDir, 'report.json') }],
49-
['blob', { fileName: `${process.env.PWTEST_BOT_NAME}.zip` }],
49+
['blob'],
5050
] : [
5151
['html', { open: 'on-failure', title: 'Playwright Library Tests' }]
5252
];
@@ -100,6 +100,7 @@ const config: Config<PlaywrightWorkerOptions & PlaywrightTestOptions & TestModeW
100100
forbidOnly: !!process.env.CI,
101101
retries: process.env.CI ? 3 : 0,
102102
reporter: reporters(),
103+
tag: process.env.PW_TAG,
103104
projects: [],
104105
use: {
105106
connectOptions,

tests/mcp/playwright.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const reporters = () => {
3131
const result: ReporterDescription[] = process.env.CI ? [
3232
['dot'],
3333
['json', { outputFile: path.join(outputDir, 'report.json') }],
34-
['blob', { outputDir: path.join(__dirname, '..', '..', 'blob-report'), fileName: `${process.env.PWTEST_BOT_NAME}.zip` }],
34+
['blob', { outputDir: path.join(__dirname, '..', '..', 'blob-report') }],
3535
] : [
3636
['list']
3737
];
@@ -51,6 +51,7 @@ export default defineConfig<TestOptions>({
5151
forbidOnly: !!process.env.CI,
5252
workers: process.env.CI ? 2 : undefined,
5353
reporter: reporters(),
54+
tag: process.env.PW_TAG,
5455
projects: [
5556
{ name: 'chrome', metadata: { ...metadata, browserName: 'chromium', channel: 'chrome' }, testDir },
5657
{ name: 'chromium', use: { mcpBrowser: 'chromium' }, metadata: { ...metadata, browserName: 'chromium' }, testDir },

tests/playwright-test/playwright.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const reporters = () => {
2525
const result: ReporterDescription[] = process.env.CI ? [
2626
['dot'],
2727
['json', { outputFile: path.join(outputDir, 'report.json') }],
28-
['blob', { outputDir: path.join(__dirname, '..', '..', 'blob-report'), fileName: `${process.env.PWTEST_BOT_NAME}.zip` }],
28+
['blob', { outputDir: path.join(__dirname, '..', '..', 'blob-report') }],
2929
] : [
3030
['list']
3131
];
@@ -49,6 +49,7 @@ export default defineConfig({
4949
}
5050
],
5151
reporter: reporters(),
52+
tag: process.env.PW_TAG,
5253
metadata: {
5354
clock: process.env.PW_CLOCK ? 'clock-' + process.env.PW_CLOCK : undefined,
5455
},

0 commit comments

Comments
 (0)