-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwdio.conf.js
95 lines (95 loc) · 3.43 KB
/
wdio.conf.js
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
exports.config = {
// Specify Test Files
specs: [
'./features/**/*.feature'
],
// Patterns to exclude.
exclude: [
// 'path/to/excluded/files'
],
// Capabilities
maxInstances: 10,
capabilities: [
{
'browserName': 'chrome',
'chromeOptions': {
args: ['--headless', '--no-sandbox']
}
},
{
maxInstances: 5,
browserName: 'firefox',
"moz:firefoxOptions": {
args: ['-headless']
}
}
],
//
// Test Configurations
sync: true,
//
// Level of logging verbosity: silent | verbose | command | data | result | error
logLevel: 'silent',
//
// Enables colors for log output.
coloredLogs: true,
//
// Warns when a deprecated command is used
deprecationWarnings: true,
//
// If you only want to run your tests until a specific amount of tests have failed use
// bail (default is 0 - don't bail, run all tests).
bail: 0,
//
// Saves a screenshot to a given path if a command fails.
screenshotPath: './output',
//
// Set a base URL in order to shorten url command calls.
baseUrl: 'http://localhost',
//
// Default timeout for all waitFor* commands.
waitforTimeout: 10000,
//
// Default timeout in milliseconds for request
// if Selenium Grid doesn't send response
connectionRetryTimeout: 90000,
//
// Default request retries count
connectionRetryCount: 3,
//
// Selenium standalone
services: ['selenium-standalone'],
//
// Framework you want to run your specs with.
framework: 'cucumber',
//
// Test reporter for stdout.
reporters: ['spec','junit'],
//
// If you are using Cucumber you need to specify the location of your step definitions.
cucumberOpts: {
require: ['./features/**/*.js'], // <string[]> (file/dir) require files before executing features
backtrace: false, // <boolean> show full backtrace for errors
compiler: [], // <string[]> ("extension:module") require files with the given EXTENSION after requiring MODULE (repeatable)
dryRun: false, // <boolean> invoke formatters without executing steps
failFast: false, // <boolean> abort the run on first failure
format: ['pretty'], // <string[]> (type[:path]) specify the output format, optionally supply PATH to redirect formatter output (repeatable)
colors: true, // <boolean> disable colors in formatter output
snippets: true, // <boolean> hide step definition snippets for pending steps
source: true, // <boolean> hide source uris
profile: [], // <string[]> (name) specify the profile to use
strict: false, // <boolean> fail if there are any undefined or pending steps
tags: [], // <string[]> (expression) only execute the features or scenarios with tags matching the expression
timeout: 20000, // <number> timeout for step definitions
ignoreUndefinedDefinitions: false, // <boolean> Enable this config to treat undefined definitions as warnings.
},
// Output for jUnit
reporterOptions: {
junit: {
outputDir: './output/',
outputFileFormat: function(opts) { // optional
return `${opts.capabilities}.results-${opts.cid}.xml`
}
}
},
}