-
Notifications
You must be signed in to change notification settings - Fork 3
/
playwright.benchmark.config.ts
73 lines (71 loc) · 1.96 KB
/
playwright.benchmark.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import { defineConfig, devices } from '@playwright/test';
/**
* See https://playwright.dev/docs/test-configuration.
*/
// eslint-disable-next-line import/no-default-export -- default expected
export default defineConfig({
testDir: './benchmark/tests',
// Don't run tests _within_ files in parallel as this causes flakiness locally - investigating
// Test files still run in parallel as per the number of workers set below
fullyParallel: true,
// Fail the build on CI if you accidentally left test.only in the source code.
forbidOnly: !!process.env.CI,
// Retry
retries: 0,
// Workers run tests files in parallel
workers: process.env.CI ? 4 : undefined,
// Reporter to use. See https://playwright.dev/docs/test-reporters
// Configure projects for major browsers
projects: [
{
name: 'accept-all-cmp',
use: { ...devices['Desktop Chrome'] },
testMatch: 'cmp-accept-all.setup.spec.ts',
testDir: 'playwright/benchmark',
},
{
name: 'reject-all-cmp',
use: { ...devices['Desktop Chrome'] },
testMatch: 'cmp-reject-all.setup.spec.ts',
testDir: 'playwright/benchmark',
},
{
name: 'consented',
use: {
...devices['Desktop Chrome'],
storageState: 'playwright/.auth/accept-all.json',
},
testMatch: 'test-ad-load-time.spec.ts',
testDir: 'playwright/benchmark',
dependencies: ['accept-all-cmp'],
},
{
name: 'consentless',
use: {
...devices['Desktop Chrome'],
storageState: 'playwright/.auth/reject-all.json',
},
testMatch: 'test-ad-load-time.spec.ts',
testDir: './playwright/benchmark',
dependencies: ['reject-all-cmp'],
},
{
name: 'consented-average',
use: {
...devices['Desktop Chrome'],
},
testMatch: 'average.spec.ts',
testDir: 'playwright/benchmark',
dependencies: ['consented'],
},
{
name: 'consentless-average',
use: {
...devices['Desktop Chrome'],
},
testMatch: 'average.spec.ts',
testDir: 'playwright/benchmark',
dependencies: ['consentless'],
},
],
});