@wdio/browserstack-service 7.39.0 → 7.40.0
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/insights-handler.js +1 -1
- package/build/instrumentation/funnelInstrumentation.d.ts +1 -0
- package/build/instrumentation/funnelInstrumentation.d.ts.map +1 -1
- package/build/instrumentation/funnelInstrumentation.js +2 -1
- package/build/launcher.d.ts.map +1 -1
- package/build/launcher.js +40 -0
- package/build/reporter.js +1 -1
- package/package.json +4 -4
|
@@ -541,7 +541,7 @@ class _InsightsHandler {
|
|
|
541
541
|
if (!passed) {
|
|
542
542
|
testData.result = (error && error.message && error.message.includes('sync skip; aborting execution')) ? 'ignore' : 'failed';
|
|
543
543
|
if (error && testData.result != 'skipped') {
|
|
544
|
-
testData.failure = [{ backtrace: [(0, util_1.removeAnsiColors)(error.message)] }]; // add all errors here
|
|
544
|
+
testData.failure = [{ backtrace: [(0, util_1.removeAnsiColors)(error.message), (0, util_1.removeAnsiColors)(error.stack || '')] }]; // add all errors here
|
|
545
545
|
testData.failure_reason = (0, util_1.removeAnsiColors)(error.message);
|
|
546
546
|
testData.failure_type = (0, util_1.isUndefined)(error.message) ? null : error.message.toString().match(/AssertionError/) ? 'AssertionError' : 'UnhandledError'; //verify if this is working
|
|
547
547
|
}
|
|
@@ -4,5 +4,6 @@ export declare function sendStart(config: BrowserStackConfig): Promise<void>;
|
|
|
4
4
|
export declare function sendFinish(config: BrowserStackConfig): Promise<void>;
|
|
5
5
|
export declare function saveFunnelData(eventType: string, config: BrowserStackConfig): string;
|
|
6
6
|
export declare function fireFunnelRequest(data: any): Promise<void>;
|
|
7
|
+
export declare function getProductMap(config: BrowserStackConfig): any;
|
|
7
8
|
export declare function handleHealingInstrumentation(authResult: BrowserstackHealing.InitErrorResponse | BrowserstackHealing.InitSuccessResponse, config: BrowserStackConfig, isSelfHealEnabled: boolean | undefined): void;
|
|
8
9
|
//# sourceMappingURL=funnelInstrumentation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"funnelInstrumentation.d.ts","sourceRoot":"","sources":["../../src/instrumentation/funnelInstrumentation.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,kBAAkB,MAAM,WAAW,CAAA;AAG/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAoBpE,wBAAsB,SAAS,CAAC,MAAM,EAAE,kBAAkB,iBAEzD;AAED,wBAAsB,UAAU,CAAC,MAAM,EAAE,kBAAkB,iBAE1D;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAOpF;AAGD,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAOhE;
|
|
1
|
+
{"version":3,"file":"funnelInstrumentation.d.ts","sourceRoot":"","sources":["../../src/instrumentation/funnelInstrumentation.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,kBAAkB,MAAM,WAAW,CAAA;AAG/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAoBpE,wBAAsB,SAAS,CAAC,MAAM,EAAE,kBAAkB,iBAEzD;AAED,wBAAsB,UAAU,CAAC,MAAM,EAAE,kBAAkB,iBAE1D;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAOpF;AAGD,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAOhE;AA0BD,wBAAgB,aAAa,CAAC,MAAM,EAAE,kBAAkB,GAAG,GAAG,CAQ7D;AAwHD,wBAAgB,4BAA4B,CACxC,UAAU,EAAE,mBAAmB,CAAC,iBAAiB,GAAG,mBAAmB,CAAC,mBAAmB,EAC3F,MAAM,EAAE,kBAAkB,EAC1B,iBAAiB,EAAE,OAAO,GAAG,SAAS,QAiCzC"}
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.handleHealingInstrumentation = exports.fireFunnelRequest = exports.saveFunnelData = exports.sendFinish = exports.sendStart = void 0;
|
|
6
|
+
exports.handleHealingInstrumentation = exports.getProductMap = exports.fireFunnelRequest = exports.saveFunnelData = exports.sendFinish = exports.sendStart = void 0;
|
|
7
7
|
const node_os_1 = __importDefault(require("node:os"));
|
|
8
8
|
const node_util_1 = __importDefault(require("node:util"));
|
|
9
9
|
const node_path_1 = __importDefault(require("node:path"));
|
|
@@ -84,6 +84,7 @@ function getProductMap(config) {
|
|
|
84
84
|
'app_automate': config.appAutomate
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
|
+
exports.getProductMap = getProductMap;
|
|
87
88
|
function buildEventData(eventType, config) {
|
|
88
89
|
const eventProperties = {
|
|
89
90
|
// Framework Details
|
package/build/launcher.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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;AAMlE,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;
|
|
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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T,UAAU,CAAC,GAAG,EAAC,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAqBrD;;;OAGG;IACG,YAAY,CAAE,SAAS,EAAE,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAyBhE,qBAAqB,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC,kBAAkB,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KAAE;IAiFvH,WAAW,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC,kBAAkB,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM;IA4G5F,sBAAsB,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC,kBAAkB;IAyCrE,8BAA8B;IAgB9B;;;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
|
@@ -49,6 +49,8 @@ const config_1 = __importDefault(require("./config"));
|
|
|
49
49
|
const funnelInstrumentation_1 = require("./instrumentation/funnelInstrumentation");
|
|
50
50
|
const ai_handler_1 = __importDefault(require("./ai-handler"));
|
|
51
51
|
const bstackLogger_1 = require("./bstackLogger");
|
|
52
|
+
const funnelInstrumentation_2 = require("./instrumentation/funnelInstrumentation");
|
|
53
|
+
const testOpsConfig_1 = __importDefault(require("./testOps/testOpsConfig"));
|
|
52
54
|
const log = (0, logger_1.default)('@wdio/browserstack-service');
|
|
53
55
|
class BrowserstackLauncherService {
|
|
54
56
|
constructor(_options, capabilities, _config) {
|
|
@@ -299,6 +301,8 @@ class BrowserstackLauncherService {
|
|
|
299
301
|
PercyLogger_1.PercyLogger.error(`Error while setting up Percy ${err}`);
|
|
300
302
|
}
|
|
301
303
|
}
|
|
304
|
+
this._updateCaps(capabilities, 'testhubBuildUuid');
|
|
305
|
+
this._updateCaps(capabilities, 'buildProductMap');
|
|
302
306
|
if (!this._options.browserstackLocal) {
|
|
303
307
|
return log.info('browserstackLocal is not enabled - skipping...');
|
|
304
308
|
}
|
|
@@ -581,6 +585,12 @@ class BrowserstackLauncherService {
|
|
|
581
585
|
else if (capType === 'buildIdentifier' && value) {
|
|
582
586
|
capability['bstack:options'] = { buildIdentifier: value };
|
|
583
587
|
}
|
|
588
|
+
else if (capType === 'testhubBuildUuid') {
|
|
589
|
+
capability['bstack:options'] = { testhubBuildUuid: testOpsConfig_1.default.getInstance().buildHashedId };
|
|
590
|
+
}
|
|
591
|
+
else if (capType === 'buildProductMap') {
|
|
592
|
+
capability['bstack:options'] = { buildProductMap: (0, funnelInstrumentation_2.getProductMap)(this.browserStackConfig) };
|
|
593
|
+
}
|
|
584
594
|
}
|
|
585
595
|
else if (capType === 'local') {
|
|
586
596
|
capability['browserstack.local'] = true;
|
|
@@ -599,6 +609,12 @@ class BrowserstackLauncherService {
|
|
|
599
609
|
else if (capType === 'localIdentifier') {
|
|
600
610
|
capability['browserstack.localIdentifier'] = value;
|
|
601
611
|
}
|
|
612
|
+
else if (capType === 'testhubBuildUuid') {
|
|
613
|
+
capability['browserstack.testhubBuildUuid'] = testOpsConfig_1.default.getInstance().buildHashedId;
|
|
614
|
+
}
|
|
615
|
+
else if (capType === 'buildProductMap') {
|
|
616
|
+
capability['browserstack.buildProductMap'] = (0, funnelInstrumentation_2.getProductMap)(this.browserStackConfig);
|
|
617
|
+
}
|
|
602
618
|
}
|
|
603
619
|
else if (capType === 'local') {
|
|
604
620
|
capability['bstack:options'].local = true;
|
|
@@ -617,6 +633,12 @@ class BrowserstackLauncherService {
|
|
|
617
633
|
else if (capType === 'localIdentifier') {
|
|
618
634
|
capability['bstack:options'].localIdentifier = value;
|
|
619
635
|
}
|
|
636
|
+
else if (capType === 'testhubBuildUuid') {
|
|
637
|
+
capability['bstack:options'].testhubBuildUuid = testOpsConfig_1.default.getInstance().buildHashedId;
|
|
638
|
+
}
|
|
639
|
+
else if (capType === 'buildProductMap') {
|
|
640
|
+
capability['bstack:options'].buildProductMap = (0, funnelInstrumentation_2.getProductMap)(this.browserStackConfig);
|
|
641
|
+
}
|
|
620
642
|
});
|
|
621
643
|
}
|
|
622
644
|
else if (typeof capabilities === 'object') {
|
|
@@ -633,6 +655,12 @@ class BrowserstackLauncherService {
|
|
|
633
655
|
else if (capType === 'buildIdentifier' && value) {
|
|
634
656
|
caps.capabilities['bstack:options'] = { buildIdentifier: value };
|
|
635
657
|
}
|
|
658
|
+
else if (capType === 'testhubBuildUuid') {
|
|
659
|
+
caps.capabilities['bstack:options'] = { testhubBuildUuid: testOpsConfig_1.default.getInstance().buildHashedId };
|
|
660
|
+
}
|
|
661
|
+
else if (capType === 'buildProductMap') {
|
|
662
|
+
caps.capabilities['bstack:options'] = { buildProductMap: (0, funnelInstrumentation_2.getProductMap)(this.browserStackConfig) };
|
|
663
|
+
}
|
|
636
664
|
}
|
|
637
665
|
else if (capType === 'local') {
|
|
638
666
|
caps.capabilities['browserstack.local'] = true;
|
|
@@ -651,6 +679,12 @@ class BrowserstackLauncherService {
|
|
|
651
679
|
else if (capType === 'localIdentifier') {
|
|
652
680
|
caps.capabilities['browserstack.localIdentifier'] = value;
|
|
653
681
|
}
|
|
682
|
+
else if (capType === 'testhubBuildUuid') {
|
|
683
|
+
caps.capabilities['browserstack.testhubBuildUuid'] = testOpsConfig_1.default.getInstance().buildHashedId;
|
|
684
|
+
}
|
|
685
|
+
else if (capType === 'buildProductMap') {
|
|
686
|
+
caps.capabilities['browserstack.buildProductMap'] = (0, funnelInstrumentation_2.getProductMap)(this.browserStackConfig);
|
|
687
|
+
}
|
|
654
688
|
}
|
|
655
689
|
else if (capType === 'local') {
|
|
656
690
|
caps.capabilities['bstack:options'].local = true;
|
|
@@ -669,6 +703,12 @@ class BrowserstackLauncherService {
|
|
|
669
703
|
else if (capType === 'localIdentifier') {
|
|
670
704
|
caps.capabilities['bstack:options'].localIdentifier = value;
|
|
671
705
|
}
|
|
706
|
+
else if (capType === 'testhubBuildUuid') {
|
|
707
|
+
caps.capabilities['bstack:options'].testhubBuildUuid = testOpsConfig_1.default.getInstance().buildHashedId;
|
|
708
|
+
}
|
|
709
|
+
else if (capType === 'buildProductMap') {
|
|
710
|
+
caps.capabilities['bstack:options'].buildProductMap = (0, funnelInstrumentation_2.getProductMap)(this.browserStackConfig);
|
|
711
|
+
}
|
|
672
712
|
});
|
|
673
713
|
}
|
|
674
714
|
else {
|
package/build/reporter.js
CHANGED
|
@@ -226,7 +226,7 @@ class _TestReporter extends reporter_1.default {
|
|
|
226
226
|
if (failed) {
|
|
227
227
|
testData.result = (error && error.message && error.message.includes('sync skip; aborting execution')) ? 'ignore' : 'failed';
|
|
228
228
|
if (error && testData.result != 'skipped') {
|
|
229
|
-
testData.failure = [{ backtrace: [(0, util_1.removeAnsiColors)(error.message)] }]; // add all errors here
|
|
229
|
+
testData.failure = [{ backtrace: [(0, util_1.removeAnsiColors)(error.message), (0, util_1.removeAnsiColors)(error.stack || '')] }]; // add all errors here
|
|
230
230
|
testData.failure_reason = (0, util_1.removeAnsiColors)(error.message);
|
|
231
231
|
testData.failure_type = error.message == null ? null : error.message.toString().match(/AssertionError/) ? 'AssertionError' : 'UnhandledError'; //verify if this is working
|
|
232
232
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/browserstack-service",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.40.0",
|
|
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",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@types/gitconfiglocal": "^2.0.1",
|
|
30
30
|
"@wdio/logger": "7.26.0",
|
|
31
31
|
"@wdio/reporter": "7.25.4",
|
|
32
|
-
"@wdio/types": "7.
|
|
32
|
+
"@wdio/types": "7.40.0",
|
|
33
33
|
"browserstack-local": "^1.4.5",
|
|
34
34
|
"csv-writer": "^1.6.0",
|
|
35
35
|
"form-data": "^4.0.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"gitconfiglocal": "^2.1.0",
|
|
38
38
|
"got": "^11.0.2",
|
|
39
39
|
"uuid": "^9.0.1",
|
|
40
|
-
"webdriverio": "7.
|
|
40
|
+
"webdriverio": "7.40.0",
|
|
41
41
|
"winston-transport": "^4.5.0",
|
|
42
42
|
"yauzl": "^2.10.0"
|
|
43
43
|
},
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
50
|
"types": "./build/index.d.ts",
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "6d44a39b17edb7c45c88a780bf1dbefe388550fb"
|
|
52
52
|
}
|