-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
43 lines (41 loc) · 1.24 KB
/
playwright.config.ts
File metadata and controls
43 lines (41 loc) · 1.24 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
import { defineConfig, devices } from '@playwright/test';
import { defineBddConfig, cucumberReporter } from 'playwright-bdd';
const testDir = defineBddConfig({
features: './tests/features/*.feature',
steps: './dist/*.js',
});
export default defineConfig({
// Look for test files in the directory, relative to this configuration file
testDir,
// Each test is given 30 seconds to finish
timeout: 30000,
workers: 8,
fullyParallel: true,
// Number of retries for each test
retries: 0,
// Forbid test.only on CI
forbidOnly: !!process.env.CI,
reporter: [
cucumberReporter('html', {
outputFile: './cucumber-report/index.html',
externalAttachments: true,
}),
],
use: {
...devices['Desktop Chrome'],
channel: 'chrome', // or 'chrome-beta'
headless: true,
viewport: { width: 1920, height: 1080, },
ignoreHTTPSErrors: true,
trace: 'on',
screenshot: 'on',
video: 'on-first-retry',
},
// Run local server with test pages before starting the tests
webServer: {
command: 'npm run start:test-server',
url: 'http://localhost:8001',
stdout: 'pipe',
stderr: 'pipe',
},
});