2022-05-25 22:45:11 +00:00
|
|
|
// playwright.config.js
|
|
|
|
// @ts-check
|
2024-04-01 18:29:47 +00:00
|
|
|
import { fileURLToPath } from 'url';
|
2022-05-25 22:45:11 +00:00
|
|
|
/** @type {import('@playwright/test').PlaywrightTestConfig} */
|
|
|
|
const config = {
|
2022-09-30 15:17:02 +00:00
|
|
|
retries: 1, //Only for debugging purposes for trace: 'on-first-retry'
|
2022-05-25 22:45:11 +00:00
|
|
|
testDir: 'tests/performance/',
|
2023-09-20 17:34:05 +00:00
|
|
|
testMatch: '*.contract.perf.spec.js', //Run everything except contract tests which require marks in dev mode
|
2022-06-03 20:12:42 +00:00
|
|
|
timeout: 60 * 1000,
|
2022-05-25 22:45:11 +00:00
|
|
|
workers: 1, //Only run in serial with 1 worker
|
|
|
|
webServer: {
|
2023-09-20 17:34:05 +00:00
|
|
|
command: 'npm run start', //need development mode for performance.marks and others
|
2024-04-01 18:29:47 +00:00
|
|
|
cwd: fileURLToPath(new URL('../', import.meta.url)), // Provide cwd for the root of the project
|
2022-06-30 18:50:47 +00:00
|
|
|
url: 'http://localhost:8080/#',
|
2022-05-25 22:45:11 +00:00
|
|
|
timeout: 200 * 1000,
|
2023-09-20 17:34:05 +00:00
|
|
|
reuseExistingServer: false
|
2022-05-25 22:45:11 +00:00
|
|
|
},
|
|
|
|
use: {
|
|
|
|
browserName: 'chromium',
|
|
|
|
baseURL: 'http://localhost:8080/',
|
2023-09-20 17:34:05 +00:00
|
|
|
headless: true,
|
|
|
|
ignoreHTTPSErrors: false, //HTTP performance varies!
|
2022-05-25 22:45:11 +00:00
|
|
|
screenshot: 'off',
|
2022-06-03 20:12:42 +00:00
|
|
|
trace: 'on-first-retry',
|
2022-05-25 22:45:11 +00:00
|
|
|
video: 'off'
|
|
|
|
},
|
|
|
|
projects: [
|
|
|
|
{
|
|
|
|
name: 'chrome',
|
2023-09-20 17:34:05 +00:00
|
|
|
testIgnore: '*.memory.perf.spec.js', //Do not run memory tests without proper flags. Shouldn't get here
|
2022-05-25 22:45:11 +00:00
|
|
|
use: {
|
|
|
|
browserName: 'chromium'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
reporter: [
|
|
|
|
['list'],
|
2023-01-29 21:49:00 +00:00
|
|
|
['junit', { outputFile: '../test-results/results.xml' }],
|
|
|
|
['json', { outputFile: '../test-results/results.json' }]
|
2022-05-25 22:45:11 +00:00
|
|
|
]
|
|
|
|
};
|
|
|
|
|
2024-01-02 15:24:22 +00:00
|
|
|
export default config;
|