-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplaywright.benchmark.config.ts
More file actions
47 lines (42 loc) · 1.16 KB
/
playwright.benchmark.config.ts
File metadata and controls
47 lines (42 loc) · 1.16 KB
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
import path from "path";
import type { PlaywrightTestConfig } from "@playwright/test";
import { devices } from "@playwright/test";
import dotenv from "dotenv";
import { defaultTestTimeout, testSiteHost } from "./constants";
dotenv.config({ path: path.resolve(__dirname, ".env"), quiet: true });
const benchmarkRuns = Number.parseInt(process.env.BENCHMARK_RUNS ?? "10", 10);
const config: PlaywrightTestConfig = {
testDir: "./benchmarks-out",
testIgnore: "**/tests/**",
timeout: defaultTestTimeout,
fullyParallel: false,
workers: 1,
retries: 0,
repeatEach: benchmarkRuns,
forbidOnly: !!process.env.CI,
reporter: [
["list", { printSteps: true }],
["./perf-summary-reporter", { inputFolder: "test-summary/perf" }],
],
reportSlowTests: null,
use: {
actionTimeout: 0,
baseURL: testSiteHost,
permissions: ["clipboard-read", "clipboard-write"],
},
projects: [
{
name: "chromium",
use: {
...devices["Desktop Chrome"],
},
},
],
outputDir: "test-results/",
webServer: {
command: "npm run start:test-site",
url: testSiteHost,
reuseExistingServer: !process.env.CI,
},
};
export default config;