@wdio/browserstack-service 7.30.1 → 7.30.3
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/README.md +50 -0
- package/build/insights-handler.d.ts.map +1 -1
- package/build/insights-handler.js +23 -18
- package/build/launcher.d.ts +8 -0
- package/build/launcher.d.ts.map +1 -1
- package/build/launcher.js +152 -3
- package/build/types.d.ts +8 -0
- package/build/types.d.ts.map +1 -1
- package/build/util.d.ts.map +1 -1
- package/build/util.js +1 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -27,6 +27,11 @@ exports.config
|
|
|
27
27
|
key: process.env.BROWSERSTACK_ACCESS_KEY,
|
|
28
28
|
services: [
|
|
29
29
|
['browserstack', {
|
|
30
|
+
testObservability: true,
|
|
31
|
+
testObservabilityOptions: {
|
|
32
|
+
projectName: "Your project name goes here",
|
|
33
|
+
buildName: "The static build job name goes here e.g. Nightly regression"
|
|
34
|
+
},
|
|
30
35
|
browserstackLocal: true
|
|
31
36
|
}]
|
|
32
37
|
],
|
|
@@ -38,6 +43,36 @@ exports.config
|
|
|
38
43
|
|
|
39
44
|
In order to authorize to the BrowserStack service your config needs to contain a [`user`](https://webdriver.io/docs/options#user) and [`key`](https://webdriver.io/docs/options#key) option.
|
|
40
45
|
|
|
46
|
+
### testObservability
|
|
47
|
+
|
|
48
|
+
By default, [`testObservability`](https://observability.browserstack.com/) is also enabled when you use the browserstack-service. You can read more about the advanced reporting and analytics functionalities of [`Test Observability`](https://browserstack.com/docs/test-observability) and also read about [`how it works`](https://browserstack.com/docs/test-observability/references/terms-and-conditions). You can visit the Test Observability dashboard after running your tests and also choose to disable it by setting the key to `false`.
|
|
49
|
+
|
|
50
|
+
You can use Test Observability even if you do not want to run your tests on the BrowserStack infrastructure. You could be running your tests on CI or on your laptop or even on other cloud service providers like Sauce Labs, Test Observability could still work and give you all the intelligent test reports and advanced analytics.
|
|
51
|
+
|
|
52
|
+
You can set your config in the following manner if you do not want to run tests on BrowserStack Automate or App Automate (infrastructure) but still want to use Test Observability (note that `user` and `key` are now defined under the scope of the `browserstack` service):
|
|
53
|
+
|
|
54
|
+
```js
|
|
55
|
+
// wdio.conf.js
|
|
56
|
+
export const config = {
|
|
57
|
+
// ...
|
|
58
|
+
services: [
|
|
59
|
+
['browserstack', {
|
|
60
|
+
testObservability: true,
|
|
61
|
+
testObservabilityOptions: {
|
|
62
|
+
user: process.env.BROWSERSTACK_USERNAME,
|
|
63
|
+
key: process.env.BROWSERSTACK_ACCESS_KEY,
|
|
64
|
+
projectName: "Your project name goes here",
|
|
65
|
+
buildName: "The static build job name goes here e.g. Nightly regression"
|
|
66
|
+
}
|
|
67
|
+
}]
|
|
68
|
+
],
|
|
69
|
+
// ...
|
|
70
|
+
};
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
[`Read more`](https://www.browserstack.com/docs/test-observability/quick-start/webdriverio#Tests_running_locally_or_elsewhere) in BrowserStack documentation about how to get started with Test Observability.
|
|
74
|
+
|
|
75
|
+
|
|
41
76
|
### browserstackLocal
|
|
42
77
|
Set this to true to enable routing connections from BrowserStack cloud through your computer.
|
|
43
78
|
|
|
@@ -179,6 +214,21 @@ Automatically set the BrowserStack Automate session status (passed/failed).
|
|
|
179
214
|
Type: `Boolean`<br />
|
|
180
215
|
Default: `true`
|
|
181
216
|
|
|
217
|
+
### buildIdentifier
|
|
218
|
+
|
|
219
|
+
**buildIdentifier** is a unique id to differentiate every execution that gets appended to buildName. Choose your buildIdentifier format from the available expressions:
|
|
220
|
+
* `${BUILD_NUMBER}`: Generates an incremental counter with every execution
|
|
221
|
+
* `${DATE_TIME}`: Generates a Timestamp with every execution. Eg. 05-Nov-19:30
|
|
222
|
+
|
|
223
|
+
```js
|
|
224
|
+
services: [
|
|
225
|
+
['browserstack', {
|
|
226
|
+
buildIdentifier: '#${BUILD_NUMBER}'
|
|
227
|
+
}]
|
|
228
|
+
]
|
|
229
|
+
```
|
|
230
|
+
Build Identifier supports usage of either or both expressions along with any other characters enabling custom formatting options.
|
|
231
|
+
|
|
182
232
|
### opts
|
|
183
233
|
|
|
184
234
|
BrowserStack Local options.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insights-handler.d.ts","sourceRoot":"","sources":["../src/insights-handler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAC9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAGzE,OAAO,KAAK,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAOtE,MAAM,CAAC,OAAO,OAAO,eAAe;IASnB,OAAO,CAAC,QAAQ;IAAwI,OAAO,CAAC,UAAU,CAAC;IAPxL,OAAO,CAAC,MAAM,CAA+B;IAC7C,OAAO,CAAC,MAAM,CAA+B;IAC7C,OAAO,CAAC,aAAa,CAAC,CAAc;IACpC,OAAO,CAAC,SAAS,CAA2D;IAC5E,OAAO,CAAC,cAAc,CAAC,CAAQ;IAC/B,OAAO,CAAC,oBAAoB,CAAoC;gBAE3C,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,kBAAkB,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC,EAAE,YAAY,CAAC,YAAY,EAAE,aAAa,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,MAAM,EAAU,UAAU,CAAC,oBAAQ;IAa1L,MAAM;IAWN,UAAU,CAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG;
|
|
1
|
+
{"version":3,"file":"insights-handler.d.ts","sourceRoot":"","sources":["../src/insights-handler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC3D,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,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,YAAY;IAgCzF,aAAa,CACf,WAAW,SAA2C,EACtD,YAAY,SAA4C;IAUtD,QAAQ;IAId;;OAEG;IAEG,cAAc,CAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,GAAG,gBAAgB,EAAE,IAAI,CAAC,EAAE,UAAU,CAAC,IAAI,GAAG,sBAAsB;IA2DtI,OAAO,CAAC,cAAc;IActB,OAAO,CAAC,YAAY;YAYN,gBAAgB;YAuEhB,2BAA2B;IAsFzC,OAAO,CAAC,qBAAqB;IAW7B,OAAO,CAAC,aAAa;CAMxB"}
|
|
@@ -36,28 +36,30 @@ class InsightsHandler {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
async beforeHook(test, context) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
uuid: hookId,
|
|
43
|
-
startedAt: (new Date()).toISOString()
|
|
44
|
-
};
|
|
45
|
-
this.attachHookData(context, hookId);
|
|
46
|
-
if (this._framework == 'mocha')
|
|
47
|
-
await this.sendTestRunEvent(test, 'HookRunStarted');
|
|
48
|
-
}
|
|
49
|
-
async afterHook(test, result) {
|
|
50
|
-
const fullTitle = (0, util_1.getUniqueIdentifier)(test);
|
|
51
|
-
if (this._tests[fullTitle]) {
|
|
52
|
-
this._tests[fullTitle].finishedAt = (new Date()).toISOString();
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
39
|
+
if (this._framework == 'mocha') {
|
|
40
|
+
const fullTitle = `${test.parent} - ${test.title}`;
|
|
41
|
+
const hookId = (0, uuid_1.v4)();
|
|
55
42
|
this._tests[fullTitle] = {
|
|
56
|
-
|
|
43
|
+
uuid: hookId,
|
|
44
|
+
startedAt: (new Date()).toISOString()
|
|
57
45
|
};
|
|
46
|
+
this.attachHookData(context, hookId);
|
|
47
|
+
await this.sendTestRunEvent(test, 'HookRunStarted');
|
|
58
48
|
}
|
|
59
|
-
|
|
49
|
+
}
|
|
50
|
+
async afterHook(test, result) {
|
|
51
|
+
if (this._framework == 'mocha') {
|
|
52
|
+
const fullTitle = (0, util_1.getUniqueIdentifier)(test);
|
|
53
|
+
if (this._tests[fullTitle]) {
|
|
54
|
+
this._tests[fullTitle].finishedAt = (new Date()).toISOString();
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
this._tests[fullTitle] = {
|
|
58
|
+
finishedAt: (new Date()).toISOString()
|
|
59
|
+
};
|
|
60
|
+
}
|
|
60
61
|
await this.sendTestRunEvent(test, 'HookRunFinished', result);
|
|
62
|
+
}
|
|
61
63
|
}
|
|
62
64
|
async beforeTest(test) {
|
|
63
65
|
const fullTitle = (0, util_1.getUniqueIdentifier)(test);
|
|
@@ -194,6 +196,9 @@ class InsightsHandler {
|
|
|
194
196
|
}
|
|
195
197
|
const dataKey = `${args.sessionId}_${args.method}_${args.endpoint}`;
|
|
196
198
|
const requestData = this._commands[dataKey];
|
|
199
|
+
if (!requestData) {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
197
202
|
// log http request
|
|
198
203
|
const req = this._requestQueueHandler.add({
|
|
199
204
|
event_type: 'LogCreated',
|
package/build/launcher.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export default class BrowserstackLauncherService implements Services.ServiceInst
|
|
|
12
12
|
private _buildName?;
|
|
13
13
|
private _projectName?;
|
|
14
14
|
private _buildTag?;
|
|
15
|
+
private _buildIdentifier?;
|
|
15
16
|
constructor(_options: BrowserstackConfig & Options.Testrunner, capabilities: Capabilities.RemoteCapability, _config: Options.Testrunner);
|
|
16
17
|
onPrepare(config?: Options.Testrunner, capabilities?: Capabilities.RemoteCapabilities): Promise<unknown>;
|
|
17
18
|
onComplete(): Promise<unknown>;
|
|
@@ -22,6 +23,13 @@ export default class BrowserstackLauncherService implements Services.ServiceInst
|
|
|
22
23
|
*/
|
|
23
24
|
_validateApp(appConfig: AppConfig | string): Promise<App>;
|
|
24
25
|
_updateCaps(capabilities?: Capabilities.RemoteCapabilities, capType?: string, value?: string): void;
|
|
26
|
+
_handleBuildIdentifier(capabilities?: Capabilities.RemoteCapabilities): void;
|
|
27
|
+
/**
|
|
28
|
+
* @return {string} if buildName doesn't exist in json file, it will return 1
|
|
29
|
+
* else returns corresponding value in json file (e.g. { "wdio-build": { "identifier" : 2 } } => 2 in this case)
|
|
30
|
+
*/
|
|
31
|
+
_getLocalBuildNumber(): string | null;
|
|
32
|
+
_updateLocalBuildCache(filePath?: string, buildName?: string, buildIdentifier?: number): void;
|
|
25
33
|
}
|
|
26
34
|
export {};
|
|
27
35
|
//# sourceMappingURL=launcher.d.ts.map
|
package/build/launcher.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,yBAAyB,MAAM,oBAAoB,CAAA;AAE/D,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAIlE,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAMpF,KAAK,iBAAiB,GAAG,yBAAyB,CAAC,KAAK,GAAG;IACvD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI,CAAC;CAC7C,CAAA;AAED,MAAM,CAAC,OAAO,OAAO,2BAA4B,YAAW,QAAQ,CAAC,eAAe;IAQ5E,OAAO,CAAC,QAAQ;IAEhB,OAAO,CAAC,OAAO;IATnB,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IACrC,OAAO,CAAC,UAAU,CAAC,CAAQ;IAC3B,OAAO,CAAC,YAAY,CAAC,CAAQ;IAC7B,OAAO,CAAC,SAAS,CAAC,CAAQ;IAC1B,OAAO,CAAC,gBAAgB,CAAC,CAAQ;gBAGrB,QAAQ,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,EACzD,YAAY,EAAE,YAAY,CAAC,gBAAgB,EACnC,OAAO,EAAE,OAAO,CAAC,UAAU;IAuDjC,SAAS,CAAE,MAAM,CAAC,EAAE,OAAO,CAAC,UAAU,EAAE,YAAY,CAAC,EAAE,YAAY,CAAC,kBAAkB;IA2GtF,UAAU;IA2CV,UAAU,CAAC,GAAG,EAAC,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAkBrD;;;OAGG;IACG,YAAY,CAAE,SAAS,EAAE,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAyBhE,WAAW,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC,kBAAkB,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAC,MAAM;IAoF3F,sBAAsB,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC,kBAAkB;IAyCrE;;;OAGG;IACH,oBAAoB;IA6BpB,sBAAsB,CAAC,QAAQ,CAAC,EAAC,MAAM,EAAE,SAAS,CAAC,EAAC,MAAM,EAAE,eAAe,CAAC,EAAC,MAAM;CAQtF"}
|
package/build/launcher.js
CHANGED
|
@@ -32,6 +32,7 @@ const fs_1 = __importDefault(require("fs"));
|
|
|
32
32
|
const path_1 = __importDefault(require("path"));
|
|
33
33
|
const util_1 = require("util");
|
|
34
34
|
const perf_hooks_1 = require("perf_hooks");
|
|
35
|
+
const os_1 = __importDefault(require("os"));
|
|
35
36
|
const webdriverio_1 = require("webdriverio");
|
|
36
37
|
const BrowserstackLocalLauncher = __importStar(require("browserstack-local"));
|
|
37
38
|
const logger_1 = __importDefault(require("@wdio/logger"));
|
|
@@ -48,6 +49,7 @@ class BrowserstackLauncherService {
|
|
|
48
49
|
this._config || (this._config = _options);
|
|
49
50
|
if (Array.isArray(capabilities)) {
|
|
50
51
|
capabilities.forEach((capability) => {
|
|
52
|
+
var _a, _b;
|
|
51
53
|
if (!capability['bstack:options']) {
|
|
52
54
|
const extensionCaps = Object.keys(capability).filter((cap) => cap.includes(':'));
|
|
53
55
|
if (extensionCaps.length) {
|
|
@@ -56,12 +58,15 @@ class BrowserstackLauncherService {
|
|
|
56
58
|
else if ((0, util_2.shouldAddServiceVersion)(this._config, this._options.testObservability)) {
|
|
57
59
|
capability['browserstack.wdioService'] = package_json_1.version;
|
|
58
60
|
}
|
|
61
|
+
this._buildIdentifier = (_a = capability['browserstack.buildIdentifier']) === null || _a === void 0 ? void 0 : _a.toString();
|
|
62
|
+
this._buildName = (_b = capability['build']) === null || _b === void 0 ? void 0 : _b.toString();
|
|
59
63
|
}
|
|
60
64
|
else {
|
|
61
65
|
capability['bstack:options'].wdioService = package_json_1.version;
|
|
62
66
|
this._buildName = capability['bstack:options'].buildName;
|
|
63
67
|
this._projectName = capability['bstack:options'].projectName;
|
|
64
68
|
this._buildTag = capability['bstack:options'].buildTag;
|
|
69
|
+
this._buildIdentifier = capability['bstack:options'].buildIdentifier;
|
|
65
70
|
}
|
|
66
71
|
});
|
|
67
72
|
}
|
|
@@ -75,6 +80,7 @@ class BrowserstackLauncherService {
|
|
|
75
80
|
else if ((0, util_2.shouldAddServiceVersion)(this._config, this._options.testObservability)) {
|
|
76
81
|
caps.capabilities['browserstack.wdioService'] = package_json_1.version;
|
|
77
82
|
}
|
|
83
|
+
this._buildIdentifier = caps.capabilities['browserstack.buildIdentifier'];
|
|
78
84
|
}
|
|
79
85
|
else {
|
|
80
86
|
const bstackOptions = caps.capabilities['bstack:options'];
|
|
@@ -82,6 +88,7 @@ class BrowserstackLauncherService {
|
|
|
82
88
|
this._buildName = bstackOptions.buildName;
|
|
83
89
|
this._projectName = bstackOptions.projectName;
|
|
84
90
|
this._buildTag = bstackOptions.buildTag;
|
|
91
|
+
this._buildIdentifier = bstackOptions.buildIdentifier;
|
|
85
92
|
}
|
|
86
93
|
});
|
|
87
94
|
}
|
|
@@ -127,13 +134,26 @@ class BrowserstackLauncherService {
|
|
|
127
134
|
log.info(`Using app: ${app.app}`);
|
|
128
135
|
this._updateCaps(capabilities, 'app', app.app);
|
|
129
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* buildIdentifier in service options will take precedence over specified in capabilities
|
|
139
|
+
*/
|
|
140
|
+
if (this._options.buildIdentifier) {
|
|
141
|
+
this._buildIdentifier = this._options.buildIdentifier;
|
|
142
|
+
this._updateCaps(capabilities, 'buildIdentifier', this._buildIdentifier);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* evaluate buildIdentifier in case unique execution identifiers are present
|
|
146
|
+
* e.g., ${BUILD_NUMBER} and ${DATE_TIME}
|
|
147
|
+
*/
|
|
148
|
+
this._handleBuildIdentifier(capabilities);
|
|
130
149
|
if (this._options.testObservability) {
|
|
131
150
|
log.debug('Sending launch start event');
|
|
132
151
|
await (0, util_2.launchTestSession)(this._options, this._config, {
|
|
133
152
|
projectName: this._projectName,
|
|
134
153
|
buildName: this._buildName,
|
|
135
154
|
buildTag: this._buildTag,
|
|
136
|
-
bstackServiceVersion: package_json_1.version
|
|
155
|
+
bstackServiceVersion: package_json_1.version,
|
|
156
|
+
buildIdentifier: this._buildIdentifier
|
|
137
157
|
});
|
|
138
158
|
}
|
|
139
159
|
if (!this._options.browserstackLocal) {
|
|
@@ -145,6 +165,9 @@ class BrowserstackLauncherService {
|
|
|
145
165
|
};
|
|
146
166
|
this.browserstackLocal = new BrowserstackLocalLauncher.Local();
|
|
147
167
|
this._updateCaps(capabilities, 'local');
|
|
168
|
+
if (opts.localIdentifier) {
|
|
169
|
+
this._updateCaps(capabilities, 'localIdentifier', opts.localIdentifier);
|
|
170
|
+
}
|
|
148
171
|
/**
|
|
149
172
|
* measure BrowserStack tunnel boot time
|
|
150
173
|
*/
|
|
@@ -264,12 +287,26 @@ class BrowserstackLauncherService {
|
|
|
264
287
|
else if (capType === 'app') {
|
|
265
288
|
capability['appium:app'] = value;
|
|
266
289
|
}
|
|
290
|
+
else if (capType === 'buildIdentifier' && value) {
|
|
291
|
+
capability['bstack:options'] = { buildIdentifier: value };
|
|
292
|
+
}
|
|
267
293
|
}
|
|
268
294
|
else if (capType === 'local') {
|
|
269
295
|
capability['browserstack.local'] = true;
|
|
270
296
|
}
|
|
271
297
|
else if (capType === 'app') {
|
|
272
|
-
capability
|
|
298
|
+
capability.app = value;
|
|
299
|
+
}
|
|
300
|
+
else if (capType === 'buildIdentifier') {
|
|
301
|
+
if (value) {
|
|
302
|
+
capability['browserstack.buildIdentifier'] = value;
|
|
303
|
+
}
|
|
304
|
+
else {
|
|
305
|
+
delete capability['browserstack.buildIdentifier'];
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
else if (capType === 'localIdentifier') {
|
|
309
|
+
capability['browserstack.localIdentifier'] = value;
|
|
273
310
|
}
|
|
274
311
|
}
|
|
275
312
|
else if (capType === 'local') {
|
|
@@ -278,6 +315,17 @@ class BrowserstackLauncherService {
|
|
|
278
315
|
else if (capType === 'app') {
|
|
279
316
|
capability['appium:app'] = value;
|
|
280
317
|
}
|
|
318
|
+
else if (capType === 'buildIdentifier') {
|
|
319
|
+
if (value) {
|
|
320
|
+
capability['bstack:options'].buildIdentifier = value;
|
|
321
|
+
}
|
|
322
|
+
else {
|
|
323
|
+
delete capability['bstack:options'].buildIdentifier;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
else if (capType === 'localIdentifier') {
|
|
327
|
+
capability['bstack:options'].localIdentifier = value;
|
|
328
|
+
}
|
|
281
329
|
});
|
|
282
330
|
}
|
|
283
331
|
else if (typeof capabilities === 'object') {
|
|
@@ -291,12 +339,26 @@ class BrowserstackLauncherService {
|
|
|
291
339
|
else if (capType === 'app') {
|
|
292
340
|
caps.capabilities['appium:app'] = value;
|
|
293
341
|
}
|
|
342
|
+
else if (capType === 'buildIdentifier' && value) {
|
|
343
|
+
caps.capabilities['bstack:options'] = { buildIdentifier: value };
|
|
344
|
+
}
|
|
294
345
|
}
|
|
295
346
|
else if (capType === 'local') {
|
|
296
347
|
caps.capabilities['browserstack.local'] = true;
|
|
297
348
|
}
|
|
298
349
|
else if (capType === 'app') {
|
|
299
|
-
caps.capabilities
|
|
350
|
+
caps.capabilities.app = value;
|
|
351
|
+
}
|
|
352
|
+
else if (capType === 'buildIdentifier') {
|
|
353
|
+
if (value) {
|
|
354
|
+
caps.capabilities['browserstack.buildIdentifier'] = value;
|
|
355
|
+
}
|
|
356
|
+
else {
|
|
357
|
+
delete caps.capabilities['browserstack.buildIdentifier'];
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
else if (capType === 'localIdentifier') {
|
|
361
|
+
caps.capabilities['browserstack.localIdentifier'] = value;
|
|
300
362
|
}
|
|
301
363
|
}
|
|
302
364
|
else if (capType === 'local') {
|
|
@@ -305,11 +367,98 @@ class BrowserstackLauncherService {
|
|
|
305
367
|
else if (capType === 'app') {
|
|
306
368
|
caps.capabilities['appium:app'] = value;
|
|
307
369
|
}
|
|
370
|
+
else if (capType === 'buildIdentifier') {
|
|
371
|
+
if (value) {
|
|
372
|
+
caps.capabilities['bstack:options'].buildIdentifier = value;
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
delete caps.capabilities['bstack:options'].buildIdentifier;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
else if (capType === 'localIdentifier') {
|
|
379
|
+
caps.capabilities['bstack:options'].localIdentifier = value;
|
|
380
|
+
}
|
|
308
381
|
});
|
|
309
382
|
}
|
|
310
383
|
else {
|
|
311
384
|
throw new webdriverio_1.SevereServiceError('Capabilities should be an object or Array!');
|
|
312
385
|
}
|
|
313
386
|
}
|
|
387
|
+
_handleBuildIdentifier(capabilities) {
|
|
388
|
+
if (!this._buildIdentifier) {
|
|
389
|
+
return;
|
|
390
|
+
}
|
|
391
|
+
if ((!this._buildName || process.env.BROWSERSTACK_BUILD_NAME) && this._buildIdentifier) {
|
|
392
|
+
this._updateCaps(capabilities, 'buildIdentifier');
|
|
393
|
+
log.warn('Skipping buildIdentifier as buildName is not passed.');
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
if (this._buildIdentifier && this._buildIdentifier.includes('${DATE_TIME}')) {
|
|
397
|
+
const formattedDate = new Intl.DateTimeFormat('en-GB', {
|
|
398
|
+
month: 'short',
|
|
399
|
+
day: '2-digit',
|
|
400
|
+
hour: '2-digit',
|
|
401
|
+
minute: '2-digit',
|
|
402
|
+
hour12: false
|
|
403
|
+
})
|
|
404
|
+
.format(new Date())
|
|
405
|
+
.replace(/ |, /g, '-');
|
|
406
|
+
this._buildIdentifier = this._buildIdentifier.replace('${DATE_TIME}', formattedDate);
|
|
407
|
+
this._updateCaps(capabilities, 'buildIdentifier', this._buildIdentifier);
|
|
408
|
+
}
|
|
409
|
+
if (!this._buildIdentifier.includes('${BUILD_NUMBER}')) {
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
const ciInfo = (0, util_2.getCiInfo)();
|
|
413
|
+
if (ciInfo && ciInfo.build_number) {
|
|
414
|
+
this._buildIdentifier = this._buildIdentifier.replace('${BUILD_NUMBER}', 'CI ' + ciInfo.build_number);
|
|
415
|
+
this._updateCaps(capabilities, 'buildIdentifier', this._buildIdentifier);
|
|
416
|
+
}
|
|
417
|
+
else {
|
|
418
|
+
const localBuildNumber = this._getLocalBuildNumber();
|
|
419
|
+
if (localBuildNumber) {
|
|
420
|
+
this._buildIdentifier = this._buildIdentifier.replace('${BUILD_NUMBER}', localBuildNumber);
|
|
421
|
+
this._updateCaps(capabilities, 'buildIdentifier', this._buildIdentifier);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* @return {string} if buildName doesn't exist in json file, it will return 1
|
|
427
|
+
* else returns corresponding value in json file (e.g. { "wdio-build": { "identifier" : 2 } } => 2 in this case)
|
|
428
|
+
*/
|
|
429
|
+
_getLocalBuildNumber() {
|
|
430
|
+
let browserstackFolderPath = path_1.default.join(os_1.default.homedir(), '.browserstack');
|
|
431
|
+
try {
|
|
432
|
+
if (!fs_1.default.existsSync(browserstackFolderPath)) {
|
|
433
|
+
fs_1.default.mkdirSync(browserstackFolderPath);
|
|
434
|
+
}
|
|
435
|
+
let filePath = path_1.default.join(browserstackFolderPath, '.build-name-cache.json');
|
|
436
|
+
if (!fs_1.default.existsSync(filePath)) {
|
|
437
|
+
fs_1.default.appendFileSync(filePath, JSON.stringify({}));
|
|
438
|
+
}
|
|
439
|
+
const buildCacheFileData = fs_1.default.readFileSync(filePath);
|
|
440
|
+
const parsedBuildCacheFileData = JSON.parse(buildCacheFileData.toString());
|
|
441
|
+
if (this._buildName && this._buildName in parsedBuildCacheFileData) {
|
|
442
|
+
const prevIdentifier = parseInt((parsedBuildCacheFileData[this._buildName]['identifier']));
|
|
443
|
+
const newIdentifier = prevIdentifier + 1;
|
|
444
|
+
this._updateLocalBuildCache(filePath, this._buildName, newIdentifier);
|
|
445
|
+
return newIdentifier.toString();
|
|
446
|
+
}
|
|
447
|
+
const newIdentifier = 1;
|
|
448
|
+
this._updateLocalBuildCache(filePath, this._buildName, 1);
|
|
449
|
+
return newIdentifier.toString();
|
|
450
|
+
}
|
|
451
|
+
catch (error) {
|
|
452
|
+
return null;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
_updateLocalBuildCache(filePath, buildName, buildIdentifier) {
|
|
456
|
+
if (!buildName || !filePath) {
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
459
|
+
let jsonContent = JSON.parse(fs_1.default.readFileSync(filePath).toString());
|
|
460
|
+
jsonContent[buildName] = { 'identifier': buildIdentifier };
|
|
461
|
+
fs_1.default.writeFileSync(filePath, JSON.stringify(jsonContent));
|
|
462
|
+
}
|
|
314
463
|
}
|
|
315
464
|
exports.default = BrowserstackLauncherService;
|
package/build/types.d.ts
CHANGED
|
@@ -28,6 +28,13 @@ export interface TestObservabilityOptions {
|
|
|
28
28
|
key?: string;
|
|
29
29
|
}
|
|
30
30
|
export interface BrowserstackConfig {
|
|
31
|
+
/**
|
|
32
|
+
*`buildIdentifier` is a unique id to differentiate every execution that gets appended to
|
|
33
|
+
* buildName. Choose your buildIdentifier format from the available expressions:
|
|
34
|
+
* ${BUILD_NUMBER} (Default): Generates an incremental counter with every execution
|
|
35
|
+
* ${DATE_TIME}: Generates a Timestamp with every execution. Eg. 05-Nov-19:30
|
|
36
|
+
*/
|
|
37
|
+
buildIdentifier?: string;
|
|
31
38
|
/**
|
|
32
39
|
* Set this to true to enable BrowserStack Test Observability which will collect test related data
|
|
33
40
|
* (name, hierarchy, status, error stack trace, file name and hierarchy), test commands, etc.
|
|
@@ -165,6 +172,7 @@ export interface UserConfig {
|
|
|
165
172
|
projectName?: string;
|
|
166
173
|
buildTag?: string;
|
|
167
174
|
bstackServiceVersion?: string;
|
|
175
|
+
buildIdentifier?: string;
|
|
168
176
|
}
|
|
169
177
|
export interface UploadType {
|
|
170
178
|
event_type: string;
|
package/build/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAExD,MAAM,WAAW,eAAe;IAE5B,kBAAkB,EAAE;QAEhB,WAAW,EAAE,MAAM,CAAA;KACtB,CAAA;CACJ;AAED,MAAM,MAAM,iBAAiB,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;AAE1F,MAAM,MAAM,SAAS,GAAG;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,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S,CAAC,EAAE,MAAM,YAG9C;AAED,wBAAgB,WAAW,CAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAWrD;AAED,wBAAgB,mBAAmB,CAAE,IAAI,EAAE,iBAAiB,GAAG,gBAAgB,4BAE9E;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,EAAE,iBAAiB,CAAC,EAAE,OAAO,GAAG,OAAO,CAKxG;AAED,wBAAsB,kBAAkB,CAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,iBAmB3F;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,UAAU,sBAQhH;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,UAAU,sBAQ/G;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,EAAE,iBAAiB,CAAC,EAAE,MAAM,sBAQnH;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,EAAE,eAAe,CAAC,EAAE,MAAM,UAQ/G;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAW7H;AAED,eAAO,MAAM,KAAK,mCAAkE,CAAA"}
|
package/build/util.js
CHANGED
|
@@ -114,6 +114,7 @@ async function launchTestSession(options, config, bsConfig) {
|
|
|
114
114
|
format: 'json',
|
|
115
115
|
project_name: getObservabilityProject(options, bsConfig.projectName),
|
|
116
116
|
name: getObservabilityBuild(options, bsConfig.buildName),
|
|
117
|
+
build_identifier: bsConfig.buildIdentifier,
|
|
117
118
|
start_time: (new Date()).toISOString(),
|
|
118
119
|
tags: getObservabilityBuildTags(options, bsConfig.buildTag),
|
|
119
120
|
host_info: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/browserstack-service",
|
|
3
|
-
"version": "7.30.
|
|
3
|
+
"version": "7.30.3",
|
|
4
4
|
"description": "WebdriverIO service for better Browserstack integration",
|
|
5
5
|
"author": "Adam Bjerstedt <abjerstedt@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-browserstack-service",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"@types/gitconfiglocal": "^2.0.1",
|
|
27
27
|
"@wdio/logger": "7.26.0",
|
|
28
28
|
"@wdio/reporter": "7.25.4",
|
|
29
|
-
"@wdio/types": "7.
|
|
29
|
+
"@wdio/types": "7.30.2",
|
|
30
30
|
"browserstack-local": "^1.4.5",
|
|
31
31
|
"form-data": "^4.0.0",
|
|
32
32
|
"git-repo-info": "^2.1.1",
|
|
33
33
|
"gitconfiglocal": "^2.1.0",
|
|
34
34
|
"got": "^11.0.2",
|
|
35
35
|
"uuid": "^8.3.2",
|
|
36
|
-
"webdriverio": "7.30.
|
|
36
|
+
"webdriverio": "7.30.2"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@wdio/cli": "^5.0.0 || ^6.0.0 || ^7.0.0"
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
44
|
"types": "./build/index.d.ts",
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "cdc92da66a3cd9ab3ce5c6333ec2ab9541313a9d"
|
|
46
46
|
}
|