@wdio/cli 5.11.12 → 5.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/interface.js +3 -1
- package/build/launcher.js +26 -15
- package/build/run.js +2 -3
- package/build/templates/wdio.conf.tpl.ejs +6 -6
- package/package.json +6 -6
package/build/interface.js
CHANGED
|
@@ -27,6 +27,7 @@ class WDIOCLInterface extends _events.default {
|
|
|
27
27
|
this.isWatchMode = isWatchMode;
|
|
28
28
|
this.inDebugMode = false;
|
|
29
29
|
this.specFileRetries = config.specFileRetries || 0;
|
|
30
|
+
this.endedNormally = false;
|
|
30
31
|
this.on('job:start', this.addJob.bind(this));
|
|
31
32
|
this.on('job:end', this.clearJob.bind(this));
|
|
32
33
|
this.setup();
|
|
@@ -193,7 +194,7 @@ class WDIOCLInterface extends _events.default {
|
|
|
193
194
|
}
|
|
194
195
|
|
|
195
196
|
sigintTrigger() {
|
|
196
|
-
if (this.inDebugMode) {
|
|
197
|
+
if (this.inDebugMode || this.endedNormally) {
|
|
197
198
|
return false;
|
|
198
199
|
}
|
|
199
200
|
|
|
@@ -226,6 +227,7 @@ class WDIOCLInterface extends _events.default {
|
|
|
226
227
|
return;
|
|
227
228
|
}
|
|
228
229
|
|
|
230
|
+
this.endedNormally = true;
|
|
229
231
|
this.printReporters();
|
|
230
232
|
this.printSummary();
|
|
231
233
|
}
|
package/build/launcher.js
CHANGED
|
@@ -60,22 +60,33 @@ class Launcher {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
async run() {
|
|
63
|
-
let config = this.configParser.getConfig();
|
|
64
|
-
let caps = this.configParser.getCapabilities();
|
|
65
|
-
const launcher = (0, _utils.initialiseServices)(config, caps, 'launcher');
|
|
66
|
-
await this.runner.initialise();
|
|
67
|
-
log.info('Run onPrepare hook');
|
|
68
|
-
await (0, _utils2.runOnPrepareHook)(config.onPrepare, config, caps);
|
|
69
|
-
await (0, _utils2.runServiceHook)(launcher, 'onPrepare', config, caps);
|
|
70
63
|
(0, _asyncExitHook.default)(this.exitHandler.bind(this));
|
|
71
|
-
let exitCode
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
64
|
+
let exitCode;
|
|
65
|
+
let onCompleteResults;
|
|
66
|
+
|
|
67
|
+
try {
|
|
68
|
+
const config = this.configParser.getConfig();
|
|
69
|
+
const caps = this.configParser.getCapabilities();
|
|
70
|
+
const launcher = (0, _utils.initialiseServices)(config, caps, 'launcher');
|
|
71
|
+
await this.runner.initialise();
|
|
72
|
+
log.info('Run onPrepare hook');
|
|
73
|
+
await (0, _utils2.runOnPrepareHook)(config.onPrepare, config, caps);
|
|
74
|
+
await (0, _utils2.runServiceHook)(launcher, 'onPrepare', config, caps);
|
|
75
|
+
exitCode = await this.runMode(config, caps);
|
|
76
|
+
log.info('Run onComplete hook');
|
|
77
|
+
await (0, _utils2.runServiceHook)(launcher, 'onComplete', exitCode, config, caps);
|
|
78
|
+
onCompleteResults = await (0, _utils2.runOnCompleteHook)(config.onComplete, config, caps, exitCode, this.interface.result);
|
|
79
|
+
exitCode = onCompleteResults.includes(1) ? 1 : exitCode;
|
|
80
|
+
await _logger.default.waitForBuffer();
|
|
81
|
+
this.interface.finalise();
|
|
82
|
+
return exitCode;
|
|
83
|
+
} catch (err) {
|
|
84
|
+
if (!onCompleteResults) {
|
|
85
|
+
process.emit('shutdown', 1);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
throw err;
|
|
89
|
+
}
|
|
79
90
|
}
|
|
80
91
|
|
|
81
92
|
runMode(config, caps) {
|
package/build/run.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = run;
|
|
7
|
+
exports.launch = launch;
|
|
7
8
|
|
|
8
9
|
var _fs = _interopRequireDefault(require("fs"));
|
|
9
10
|
|
|
@@ -60,7 +61,5 @@ function run(params) {
|
|
|
60
61
|
|
|
61
62
|
function launch(wdioConf, params) {
|
|
62
63
|
const launcher = new _launcher.default(wdioConf, params);
|
|
63
|
-
launcher.run()
|
|
64
|
-
throw e;
|
|
65
|
-
}));
|
|
64
|
+
return launcher.run();
|
|
66
65
|
}
|
|
@@ -220,7 +220,7 @@ exports.config = {
|
|
|
220
220
|
source: true, // <boolean> hide source uris
|
|
221
221
|
profile: [], // <string[]> (name) specify the profile to use
|
|
222
222
|
strict: false, // <boolean> fail if there are any undefined or pending steps
|
|
223
|
-
|
|
223
|
+
tagExpression: '', // <string> (expression) only execute the features or scenarios with tags matching the expression
|
|
224
224
|
timeout: 60000, // <number> timeout for step definitions
|
|
225
225
|
ignoreUndefinedDefinitions: false, // <boolean> Enable this config to treat undefined definitions as warnings.
|
|
226
226
|
},
|
|
@@ -305,22 +305,22 @@ exports.config = {
|
|
|
305
305
|
/**
|
|
306
306
|
* Runs before a Cucumber feature
|
|
307
307
|
*/
|
|
308
|
-
// beforeFeature: function (uri, feature) {
|
|
308
|
+
// beforeFeature: function (uri, feature, scenarios) {
|
|
309
309
|
// },
|
|
310
310
|
/**
|
|
311
311
|
* Runs before a Cucumber scenario
|
|
312
312
|
*/
|
|
313
|
-
// beforeScenario: function (uri, feature, scenario) {
|
|
313
|
+
// beforeScenario: function (uri, feature, scenario, sourceLocation) {
|
|
314
314
|
// },
|
|
315
315
|
/**
|
|
316
316
|
* Runs before a Cucumber step
|
|
317
317
|
*/
|
|
318
|
-
// beforeStep: function (uri, feature
|
|
318
|
+
// beforeStep: function (uri, feature) {
|
|
319
319
|
// },
|
|
320
320
|
/**
|
|
321
321
|
* Runs after a Cucumber step
|
|
322
322
|
*/
|
|
323
|
-
// afterStep: function (uri, feature,
|
|
323
|
+
// afterStep: function (uri, feature, { error, result }) {
|
|
324
324
|
// },
|
|
325
325
|
/**
|
|
326
326
|
* Runs after a Cucumber scenario
|
|
@@ -330,7 +330,7 @@ exports.config = {
|
|
|
330
330
|
/**
|
|
331
331
|
* Runs after a Cucumber feature
|
|
332
332
|
*/
|
|
333
|
-
// afterFeature: function (uri, feature) {
|
|
333
|
+
// afterFeature: function (uri, feature, scenarios) {
|
|
334
334
|
// },
|
|
335
335
|
<% } %>
|
|
336
336
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/cli",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.12.1",
|
|
4
4
|
"description": "WebdriverIO testrunner command line interface",
|
|
5
5
|
"author": "Christian Bromann <christian@saucelabs.com>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/master/packages/wdio-cli",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"url": "https://github.com/webdriverio/webdriverio/issues"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@wdio/config": "^5.
|
|
39
|
-
"@wdio/logger": "^5.
|
|
40
|
-
"@wdio/utils": "^5.
|
|
38
|
+
"@wdio/config": "^5.12.1",
|
|
39
|
+
"@wdio/logger": "^5.12.1",
|
|
40
|
+
"@wdio/utils": "^5.12.1",
|
|
41
41
|
"async-exit-hook": "^2.0.1",
|
|
42
42
|
"chalk": "^2.3.2",
|
|
43
43
|
"chokidar": "^3.0.0",
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
"lodash.pickby": "^4.6.0",
|
|
51
51
|
"lodash.union": "^4.6.0",
|
|
52
52
|
"log-update": "^3.2.0",
|
|
53
|
-
"webdriverio": "^5.
|
|
53
|
+
"webdriverio": "^5.12.1",
|
|
54
54
|
"yargs": "^13.2.4",
|
|
55
55
|
"yarn-install": "^1.0.0"
|
|
56
56
|
},
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "848151e5fdcb8b694c1a273b9b69852c22875687"
|
|
61
61
|
}
|