-
Notifications
You must be signed in to change notification settings - Fork 92
/
Copy pathwdio.shared.conf.js
79 lines (76 loc) · 2.27 KB
/
wdio.shared.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
const { generate } = require('multiple-cucumber-html-reporter');
const { removeSync } = require('fs-extra');
/**
* This file holds all the shared config options
* The rest of the files will extend options
* More information about the config can be found
* here https://webdriver.io/docs/configurationfile.html
*/
exports.config = {
// ====================
// Runner Configuration
// ====================
runner: 'local',
// ==================
// Specify Test Files
// ==================
specs: ['./test/features/**/*.feature'],
// ============
// Capabilities
// ============
maxInstances: 100,
// capabilities can be found in the `wdio.local.chrome.conf.js` or `wdio.saucelabs.conf.js`
// ===================
// Test Configurations
// ===================
logLevel: 'silent',
bail: 0,
baseUrl: 'https://www.saucedemo.com',
waitforTimeout: 10000,
// A timeout of 3 min
connectionRetryTimeout: 3 * 60 * 1000,
connectionRetryCount: 3,
framework: 'cucumber',
// Added the `cucumberjs-json`, see
// https://github.com/wswebcreation/wdio-cucumberjs-json-reporter
reporters: ['spec', 'cucumberjs-json'],
// If you are using Cucumber you need to specify the location of your step definitions.
// See https://webdriver.io/docs/frameworks.html#using-cucumber for more information about the properties
cucumberOpts: {
require: ['./test/step-definitions/**/*.steps.js'],
backtrace: false,
requireModule: ['@babel/register'],
dryRun: false,
failFast: false,
format: ['pretty'],
snippets: true,
source: true,
profile: [],
strict: false,
tagExpression: '',
timeout: 60000,
ignoreUndefinedDefinitions: false,
},
// ========
// Services
// ========
services: [],
// =====
// Hooks
// =====
onPrepare: () => {
// Remove the `.tmp/` folder that holds the json and report files
removeSync('.tmp/');
},
onComplete: () => {
// Generate the report when it all tests are done
generate({
// Required
// This part needs to be the same path where you store the JSON files
// default = '.tmp/json/'
jsonDir: '.tmp/json/',
reportPath: '.tmp/report/',
// for more options see https://github.com/wswebcreation/multiple-cucumber-html-reporter#options
});
},
};