2022-05-25 22:45:11 +00:00
|
|
|
// playwright.config.js
|
|
|
|
// @ts-check
|
|
|
|
|
|
|
|
/** @type {import('@playwright/test').PlaywrightTestConfig} */
|
|
|
|
const config = {
|
2023-05-18 21:54:46 +00:00
|
|
|
retries: 1, //Only for debugging purposes for trace: 'on-first-retry'
|
|
|
|
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
|
2023-05-18 21:54:46 +00:00
|
|
|
timeout: 60 * 1000,
|
|
|
|
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
|
2023-05-18 21:54:46 +00:00
|
|
|
url: 'http://localhost:8080/#',
|
|
|
|
timeout: 200 * 1000,
|
2023-09-20 17:34:05 +00:00
|
|
|
reuseExistingServer: false
|
2023-05-18 21:54:46 +00:00
|
|
|
},
|
|
|
|
use: {
|
|
|
|
browserName: 'chromium',
|
|
|
|
baseURL: 'http://localhost:8080/',
|
2023-09-20 17:34:05 +00:00
|
|
|
headless: true,
|
|
|
|
ignoreHTTPSErrors: false, //HTTP performance varies!
|
2023-05-18 21:54:46 +00:00
|
|
|
screenshot: 'off',
|
|
|
|
trace: 'on-first-retry',
|
|
|
|
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
|
2023-05-18 21:54:46 +00:00
|
|
|
use: {
|
|
|
|
browserName: 'chromium'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
reporter: [
|
|
|
|
['list'],
|
|
|
|
['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;
|