-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
44 lines (39 loc) · 1.59 KB
/
playwright.config.ts
File metadata and controls
44 lines (39 loc) · 1.59 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
import dotenv from 'dotenv';
dotenv.config({ quiet: true });
import { defineConfig, ReporterDescription } from '@playwright/test';
import { allureResultsDir } from './run/constants/allure';
import { getRepeatEachCount, getRetriesCount, getWorkersCount } from './run/test/utils/binaries';
// NOTE: without this, the wrong source map is loaded and the stacktraces are all wrong
// eslint-disable-next-line @typescript-eslint/no-require-imports
require('source-map-support').install = () => {};
const useAllure = process.env.CI === '1' && process.env.ALLURE_ENABLED !== 'false';
const baseReporter: ReporterDescription = [
'./node_modules/@session-foundation/playwright-reporter/dist/index.js',
];
const allureReporter: ReporterDescription = [
'allure-playwright',
{
detail: false, // No Playwright internal steps in the test body
resultsDir: allureResultsDir,
categories: [
{
name: 'Self-healed tests', // Custom category to group healed tests for better visibility
messageRegex: '.*healed.*',
},
],
},
];
export default defineConfig({
timeout: 480000,
globalTimeout: 18000000, // extends timeout to 5 hours run full suite with 3 retries
reporter: useAllure ? [baseReporter, allureReporter] : [baseReporter],
globalSetup: require.resolve('./global-setup'),
testDir: './run/test/specs',
testIgnore: '*.js',
// outputDir: './tests/automation/test-results',
retries: getRetriesCount(),
repeatEach: getRepeatEachCount(),
workers: getWorkersCount(),
reportSlowTests: null,
fullyParallel: true, // otherwise, tests in the same file are not run in parallel
});