@wdio/runner 8.0.0-alpha.240 → 8.0.0-alpha.327

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/index.d.ts CHANGED
@@ -18,6 +18,7 @@ export default class Runner extends EventEmitter {
18
18
  private _configParser;
19
19
  private _sigintWasCalled;
20
20
  private _isMultiremote;
21
+ private _hadRunnerStartEvent;
21
22
  private _specFileRetryAttempts;
22
23
  private _reporter?;
23
24
  private _framework?;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAO1C,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAY,MAAM,aAAa,CAAA;AAalE,UAAU,IAAK,SAAQ,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC;IAC9C,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAA;IAChC,KAAK,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,aAAK,SAAS,GAAG;IACb,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,IAAI,CAAA;IACV,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,IAAI,EAAE,YAAY,CAAC,gBAAgB,CAAA;IACnC,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;CAClB,CAAA;AAkBD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,YAAY;IAC5C,OAAO,CAAC,QAAQ,CAAC,CAAgD;IACjE,OAAO,CAAC,aAAa,CAAqB;IAC1C,OAAO,CAAC,gBAAgB,CAAQ;IAChC,OAAO,CAAC,cAAc,CAAQ;IAC9B,OAAO,CAAC,sBAAsB,CAAI;IAElC,OAAO,CAAC,SAAS,CAAC,CAAc;IAChC,OAAO,CAAC,UAAU,CAAC,CAAe;IAClC,OAAO,CAAC,OAAO,CAAC,CAAoB;IACpC,OAAO,CAAC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ChC,OAAO,CAAC,UAAU,CAAC,CAAe;IAClC,OAAO,CAAC,OAAO,CAAC,CAAoB;IACpC,OAAO,CAAC,IAAI,CAAC,CAAQ;IACrB,OAAO,CAAC,MAAM,CAAC,CAAU;IACzB,OAAO,CAAC,KAAK,CAAC,CAA+B;IAE7C;;;;;;;;;OASG;IACG,GAAG,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,SAAS;IA8JpE;;;;;;OAMG;YACW,YAAY;IA6C1B;;;;;OAKG;YACW,aAAa;IAiC3B;;OAEG;YACW,gBAAgB;IA8D9B;;OAEG;YACW,SAAS;IAmCvB;;;OAGG;IACG,UAAU;CAsDnB"}
package/build/index.js CHANGED
@@ -15,6 +15,7 @@ export default class Runner extends EventEmitter {
15
15
  this._configParser = new ConfigParser();
16
16
  this._sigintWasCalled = false;
17
17
  this._isMultiremote = false;
18
+ this._hadRunnerStartEvent = false;
18
19
  this._specFileRetryAttempts = 0;
19
20
  }
20
21
  /**
@@ -46,7 +47,7 @@ export default class Runner extends EventEmitter {
46
47
  }
47
48
  catch (err) {
48
49
  log.error(`Failed to read config file: ${err.stack}`);
49
- return this._shutdown(1, retries);
50
+ return this._shutdown(1, retries, true);
50
51
  }
51
52
  /**
52
53
  * merge cli arguments again as some might have been overwritten by the config
@@ -77,7 +78,7 @@ export default class Runner extends EventEmitter {
77
78
  this._framework = await this._framework.init(cid, this._config, specs, caps, this._reporter);
78
79
  process.send({ name: 'testFrameworkInit', content: { cid, caps, specs, hasTests: this._framework.hasTests() } });
79
80
  if (!this._framework.hasTests()) {
80
- return this._shutdown(0, retries);
81
+ return this._shutdown(0, retries, true);
81
82
  }
82
83
  browser = await this._initSession(this._config, this._caps, browser);
83
84
  /**
@@ -86,7 +87,7 @@ export default class Runner extends EventEmitter {
86
87
  if (!browser) {
87
88
  const afterArgs = [1, this._caps, this._specs];
88
89
  await executeHooksWithArgs('after', this._config.after, afterArgs);
89
- return this._shutdown(1, retries);
90
+ return this._shutdown(1, retries, true);
90
91
  }
91
92
  this._reporter.caps = browser.capabilities;
92
93
  const beforeArgs = [this._caps, this._specs, browser];
@@ -98,7 +99,7 @@ export default class Runner extends EventEmitter {
98
99
  if (this._sigintWasCalled) {
99
100
  log.info('SIGINT signal detected while starting session, shutting down...');
100
101
  await this.endSession();
101
- return this._shutdown(0, retries);
102
+ return this._shutdown(0, retries, true);
102
103
  }
103
104
  /**
104
105
  * initialisation successful, send start message
@@ -127,6 +128,7 @@ export default class Runner extends EventEmitter {
127
128
  : { ...browser.capabilities, sessionId: browser.sessionId },
128
129
  retry: this._specFileRetryAttempts
129
130
  });
131
+ this._hadRunnerStartEvent = true;
130
132
  /**
131
133
  * report sessionId and target connection information to worker
132
134
  */
@@ -284,12 +286,12 @@ export default class Runner extends EventEmitter {
284
286
  /**
285
287
  * kill worker session
286
288
  */
287
- async _shutdown(failures, retries) {
289
+ async _shutdown(failures, retries, initiationFailed = false) {
288
290
  /**
289
291
  * In case of initialisation failed, the sessionId is undefined and the runner:start is not triggered.
290
292
  * So, to be able to perform the runner:end into the reporters, we need to launch the runner:start just before the runner:end.
291
293
  */
292
- if (!this._browser?.sessionId && this._reporter) {
294
+ if (this._reporter && initiationFailed) {
293
295
  this._reporter.emit('runner:start', {
294
296
  cid: this._cid,
295
297
  specs: this._specs,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/runner",
3
- "version": "8.0.0-alpha.240+c00506f0e",
3
+ "version": "8.0.0-alpha.327+9e6d91918",
4
4
  "description": "A WebdriverIO service that runs tests in arbitrary environments",
5
5
  "author": "Christian Bromann <mail@bromann.dev>",
6
6
  "homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-runner",
@@ -10,7 +10,8 @@
10
10
  },
11
11
  "repository": {
12
12
  "type": "git",
13
- "url": "git://github.com/webdriverio/webdriverio.git"
13
+ "url": "git://github.com/webdriverio/webdriverio.git",
14
+ "directory": "packages/wdio-runner"
14
15
  },
15
16
  "keywords": [
16
17
  "webdriver",
@@ -25,19 +26,19 @@
25
26
  "types": "./build/index.d.ts",
26
27
  "typeScriptVersion": "3.8.3",
27
28
  "dependencies": {
28
- "@wdio/config": "8.0.0-alpha.240+c00506f0e",
29
- "@wdio/globals": "8.0.0-alpha.240+c00506f0e",
30
- "@wdio/logger": "8.0.0-alpha.240+c00506f0e",
31
- "@wdio/types": "8.0.0-alpha.240+c00506f0e",
32
- "@wdio/utils": "8.0.0-alpha.240+c00506f0e",
29
+ "@wdio/config": "8.0.0-alpha.327+9e6d91918",
30
+ "@wdio/globals": "8.0.0-alpha.327+9e6d91918",
31
+ "@wdio/logger": "8.0.0-alpha.327+9e6d91918",
32
+ "@wdio/types": "8.0.0-alpha.327+9e6d91918",
33
+ "@wdio/utils": "8.0.0-alpha.327+9e6d91918",
33
34
  "deepmerge": "^4.0.0",
34
35
  "expect-webdriverio": "^4.0.0-alpha.3",
35
36
  "gaze": "^1.1.2",
36
- "webdriver": "8.0.0-alpha.240+c00506f0e",
37
- "webdriverio": "8.0.0-alpha.240+c00506f0e"
37
+ "webdriver": "8.0.0-alpha.327+9e6d91918",
38
+ "webdriverio": "8.0.0-alpha.327+9e6d91918"
38
39
  },
39
40
  "publishConfig": {
40
41
  "access": "public"
41
42
  },
42
- "gitHead": "c00506f0e49a88808f992ae2199b02bc6d7deff0"
43
+ "gitHead": "9e6d919187b099126ba2dae802791c659fc9c794"
43
44
  }