@wdio/browserstack-service 9.20.1 → 9.22.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/Percy/Percy-Handler.d.ts.map +1 -1
- package/build/Percy/Percy.d.ts.map +1 -1
- package/build/accessibility-handler.d.ts +6 -3
- package/build/accessibility-handler.d.ts.map +1 -1
- package/build/cleanup.js +64 -19
- package/build/cli/apiUtils.d.ts +14 -0
- package/build/cli/apiUtils.d.ts.map +1 -0
- package/build/cli/cliLogger.d.ts +16 -0
- package/build/cli/cliLogger.d.ts.map +1 -0
- package/build/cli/cliUtils.d.ts +46 -0
- package/build/cli/cliUtils.d.ts.map +1 -0
- package/build/cli/eventDispatcher.d.ts +28 -0
- package/build/cli/eventDispatcher.d.ts.map +1 -0
- package/build/cli/frameworks/automationFramework.d.ts +89 -0
- package/build/cli/frameworks/automationFramework.d.ts.map +1 -0
- package/build/cli/frameworks/constants/automationFrameworkConstants.d.ts +18 -0
- package/build/cli/frameworks/constants/automationFrameworkConstants.d.ts.map +1 -0
- package/build/cli/frameworks/constants/testFrameworkConstants.d.ts +43 -0
- package/build/cli/frameworks/constants/testFrameworkConstants.d.ts.map +1 -0
- package/build/cli/frameworks/testFramework.d.ts +89 -0
- package/build/cli/frameworks/testFramework.d.ts.map +1 -0
- package/build/cli/frameworks/wdioAutomationFramework.d.ts +28 -0
- package/build/cli/frameworks/wdioAutomationFramework.d.ts.map +1 -0
- package/build/cli/frameworks/wdioMochaTestFramework.d.ts +82 -0
- package/build/cli/frameworks/wdioMochaTestFramework.d.ts.map +1 -0
- package/build/cli/grpcClient.d.ts +70 -0
- package/build/cli/grpcClient.d.ts.map +1 -0
- package/build/cli/index.d.ts +148 -0
- package/build/cli/index.d.ts.map +1 -0
- package/build/cli/instances/automationFrameworkInstance.d.ts +33 -0
- package/build/cli/instances/automationFrameworkInstance.d.ts.map +1 -0
- package/build/cli/instances/testFrameworkInstance.d.ts +62 -0
- package/build/cli/instances/testFrameworkInstance.d.ts.map +1 -0
- package/build/cli/instances/trackedContext.d.ts +32 -0
- package/build/cli/instances/trackedContext.d.ts.map +1 -0
- package/build/cli/instances/trackedInstance.d.ts +40 -0
- package/build/cli/instances/trackedInstance.d.ts.map +1 -0
- package/build/cli/modules/accessibilityModule.d.ts +34 -0
- package/build/cli/modules/accessibilityModule.d.ts.map +1 -0
- package/build/cli/modules/automateModule.d.ts +26 -0
- package/build/cli/modules/automateModule.d.ts.map +1 -0
- package/build/cli/modules/baseModule.d.ts +34 -0
- package/build/cli/modules/baseModule.d.ts.map +1 -0
- package/build/cli/modules/observabilityModule.d.ts +22 -0
- package/build/cli/modules/observabilityModule.d.ts.map +1 -0
- package/build/cli/modules/percyModule.d.ts +19 -0
- package/build/cli/modules/percyModule.d.ts.map +1 -0
- package/build/cli/modules/testHubModule.d.ts +30 -0
- package/build/cli/modules/testHubModule.d.ts.map +1 -0
- package/build/cli/modules/webdriverIOModule.d.ts +29 -0
- package/build/cli/modules/webdriverIOModule.d.ts.map +1 -0
- package/build/cli/states/automationFrameworkState.d.ts +65 -0
- package/build/cli/states/automationFrameworkState.d.ts.map +1 -0
- package/build/cli/states/hookState.d.ts +45 -0
- package/build/cli/states/hookState.d.ts.map +1 -0
- package/build/cli/states/testFrameworkState.d.ts +125 -0
- package/build/cli/states/testFrameworkState.d.ts.map +1 -0
- package/build/constants.d.ts +5 -0
- package/build/constants.d.ts.map +1 -1
- package/build/crash-reporter.d.ts.map +1 -1
- package/build/exitHandler.d.ts.map +1 -1
- package/build/index.d.ts +48 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +6518 -2676
- package/build/insights-handler.d.ts +2 -0
- package/build/insights-handler.d.ts.map +1 -1
- package/build/instrumentation/funnelInstrumentation.d.ts.map +1 -1
- package/build/instrumentation/performance/constants.d.ts +8 -0
- package/build/instrumentation/performance/constants.d.ts.map +1 -1
- package/build/instrumentation/performance/performance-tester.d.ts.map +1 -1
- package/build/launcher.d.ts.map +1 -1
- package/build/scripts/accessibility-scripts.d.ts +1 -0
- package/build/scripts/accessibility-scripts.d.ts.map +1 -1
- package/build/service.d.ts +1 -1
- package/build/service.d.ts.map +1 -1
- package/build/types.d.ts +5 -0
- package/build/types.d.ts.map +1 -1
- package/build/util.d.ts +11 -1
- package/build/util.d.ts.map +1 -1
- package/package.json +6 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Percy-Handler.d.ts","sourceRoot":"","sources":["../../src/Percy/Percy-Handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAezE,cAAM,aAAa;IASX,OAAO,CAAC,qBAAqB;IAC7B,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,cAAc,CAAC;IACvB,OAAO,CAAC,UAAU,CAAC;IAZvB,OAAO,CAAC,YAAY,CAAC,CAAQ;IAC7B,OAAO,CAAC,iCAAiC,CAAC,CAAiB;IAC3D,OAAO,CAAC,uBAAuB,CAAI;IACnC,OAAO,CAAC,yBAAyB,CAA4D;IAC7F,OAAO,CAAC,wBAAwB,CAA8B;IAC9D,OAAO,CAAC,gBAAgB,CAAC,CAAiB;gBAG9B,qBAAqB,EAAE,MAAM,GAAG,SAAS,EACzC,QAAQ,EAAE,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,kBAAkB,EAC9D,aAAa,EAAE,YAAY,CAAC,8BAA8B,EAC1D,cAAc,CAAC,EAAE,OAAO,YAAA,EACxB,UAAU,CAAC,EAAE,MAAM,YAAA;IAO/B,eAAe,CAAC,IAAI,EAAE,MAAM;IAItB,QAAQ;IAUR,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"Percy-Handler.d.ts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AAE,OAAO,aAAoD,CAAA;AAC/E,KAAK,YAAY,GAAG,aAAa,CAAA;AAEjC,eAAe,YAAY,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Percy.d.ts","sourceRoot":"","sources":["../../src/Percy/Percy.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"Percy.d.ts","sourceRoot":"","sources":["../../src/Percy/Percy.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAQ1C,cAAM,KAAK;;IAWP,gBAAgB,UAAQ;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAO;IAC7B,gBAAgB,UAAQ;IACxB,KAAK,EAAE,OAAO,CAAA;gBAEF,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,UAAU,EAAE,QAAQ,EAAE,UAAU;IAiBxG,WAAW;IAaX,KAAK;IA6CL,IAAI;IAWV,SAAS;IAIH,eAAe;IAuCf,iBAAiB;CA8B1B;AAED,eAAe,KAAK,CAAA"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { Capabilities, Frameworks, Options } from '@wdio/types';
|
|
2
2
|
import type { BrowserstackConfig, BrowserstackOptions } from './types.js';
|
|
3
3
|
import type { ITestCaseHookParameter } from './cucumber-types.js';
|
|
4
|
+
interface AccessibilityOptions {
|
|
5
|
+
includeIssueType?: string[];
|
|
6
|
+
excludeIssueType?: string[];
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
}
|
|
4
9
|
declare class _AccessibilityHandler {
|
|
5
10
|
private _browser;
|
|
6
11
|
private isAppAutomate;
|
|
@@ -19,9 +24,7 @@ declare class _AccessibilityHandler {
|
|
|
19
24
|
private static _a11yScanSessionMap;
|
|
20
25
|
private _sessionId;
|
|
21
26
|
private listener;
|
|
22
|
-
constructor(_browser: WebdriverIO.Browser | WebdriverIO.MultiRemoteBrowser, _capabilities: Capabilities.ResolvedTestrunnerCapabilities, _options: BrowserstackConfig & BrowserstackOptions, isAppAutomate: boolean, _config: Options.Testrunner, _framework?: string | undefined, _accessibilityAutomation?: boolean | string, _turboscale?: boolean | string, _accessibilityOpts?:
|
|
23
|
-
[key: string]: unknown;
|
|
24
|
-
});
|
|
27
|
+
constructor(_browser: WebdriverIO.Browser | WebdriverIO.MultiRemoteBrowser, _capabilities: Capabilities.ResolvedTestrunnerCapabilities, _options: BrowserstackConfig & BrowserstackOptions, isAppAutomate: boolean, _config: Options.Testrunner, _framework?: string | undefined, _accessibilityAutomation?: boolean | string, _turboscale?: boolean | string, _accessibilityOpts?: AccessibilityOptions);
|
|
25
28
|
setSuiteFile(filename: string): void;
|
|
26
29
|
_getCapabilityValue(caps: Capabilities.ResolvedTestrunnerCapabilities, capType: string, legacyCapType: string): unknown;
|
|
27
30
|
before(sessionId: string): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accessibility-handler.d.ts","sourceRoot":"","sources":["../src/accessibility-handler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"accessibility-handler.d.ts","sourceRoot":"","sources":["../src/accessibility-handler.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAEpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAEzE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAajE,UAAU,oBAAoB;IAC1B,gB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a,EAAE,MAAM;IA6BvG,MAAM,CAAC,SAAS,EAAE,MAAM;IA2GxB,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI;IAuChE,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI;IAoCrE;;MAEE;IACI,cAAc,CAAC,KAAK,EAAE,sBAAsB;IAqC5C,aAAa,CAAC,KAAK,EAAE,sBAAsB;YAsCnC,cAAc;YAcd,iBAAiB;IAuB/B,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,kBAAkB;YAOZ,iBAAiB;IAkB/B,OAAO,CAAC,MAAM,CAAC,wBAAwB;YAWzB,cAAc;CAiB/B;AAGD,QAAA,MAAM,oBAAoB,EAAE,OAAO,qBAAoE,CAAA;AACvG,KAAK,oBAAoB,GAAG,qBAAqB,CAAA;AAEjD,eAAe,oBAAoB,CAAA"}
|
package/build/cleanup.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/util.ts
|
|
2
|
-
import { hostname as hostname2, platform as platform2, type as type2, version as version2, arch as arch2 } from "node:os";
|
|
2
|
+
import { hostname as hostname2, platform as platform2, type as type2, version as version2, arch as arch2, tmpdir } from "node:os";
|
|
3
3
|
import crypto from "node:crypto";
|
|
4
4
|
import fs4 from "node:fs";
|
|
5
5
|
import zlib from "node:zlib";
|
|
@@ -71,7 +71,7 @@ import logger from "@wdio/logger";
|
|
|
71
71
|
// package.json
|
|
72
72
|
var package_default = {
|
|
73
73
|
name: "@wdio/browserstack-service",
|
|
74
|
-
version: "9.
|
|
74
|
+
version: "9.21.0",
|
|
75
75
|
description: "WebdriverIO service for better Browserstack integration",
|
|
76
76
|
author: "Adam Bjerstedt <abjerstedt@gmail.com>",
|
|
77
77
|
homepage: "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-browserstack-service",
|
|
@@ -108,6 +108,7 @@ var package_default = {
|
|
|
108
108
|
typeScriptVersion: "3.8.3",
|
|
109
109
|
dependencies: {
|
|
110
110
|
"@browserstack/ai-sdk-node": "1.5.17",
|
|
111
|
+
"@browserstack/wdio-browserstack-service": "^2.0.0",
|
|
111
112
|
"@percy/appium-app": "^2.0.9",
|
|
112
113
|
"@percy/selenium-webdriver": "^2.2.2",
|
|
113
114
|
"@types/gitconfiglocal": "^2.0.1",
|
|
@@ -120,6 +121,7 @@ var package_default = {
|
|
|
120
121
|
"formdata-node": "5.0.1",
|
|
121
122
|
"git-repo-info": "^2.1.1",
|
|
122
123
|
gitconfiglocal: "^2.1.0",
|
|
124
|
+
tar: "^6.1.15",
|
|
123
125
|
undici: "^6.21.3",
|
|
124
126
|
uuid: "^11.1.0",
|
|
125
127
|
webdriverio: "workspace:*",
|
|
@@ -131,6 +133,7 @@ var package_default = {
|
|
|
131
133
|
},
|
|
132
134
|
devDependencies: {
|
|
133
135
|
"@types/node": "^20.1.0",
|
|
136
|
+
"@types/tar": "^6.1.13",
|
|
134
137
|
"@types/yauzl": "^2.10.3",
|
|
135
138
|
"@wdio/globals": "workspace:*"
|
|
136
139
|
},
|
|
@@ -142,14 +145,10 @@ var package_default = {
|
|
|
142
145
|
// src/constants.ts
|
|
143
146
|
var bstackServiceVersion = package_default.version;
|
|
144
147
|
var consoleHolder = Object.assign({}, console);
|
|
145
|
-
var DATA_ENDPOINT = "https://collector-observability.browserstack.com";
|
|
146
|
-
var APP_ALLY_ENDPOINT = "https://app-accessibility.browserstack.com/automate";
|
|
147
148
|
var APP_ALLY_ISSUES_ENDPOINT = "api/v1/issues";
|
|
148
149
|
var APP_ALLY_ISSUES_SUMMARY_ENDPOINT = "api/v1/issues-summary";
|
|
149
150
|
var BSTACK_SERVICE_VERSION = bstackServiceVersion;
|
|
150
151
|
var LOGS_FILE = "logs/bstack-wdio-service.log";
|
|
151
|
-
var FUNNEL_INSTRUMENTATION_URL = "https://api.browserstack.com/sdk/v1/event";
|
|
152
|
-
var EDS_URL = "https://eds.browserstack.com";
|
|
153
152
|
var BROWSERSTACK_TESTHUB_JWT = "BROWSERSTACK_TESTHUB_JWT";
|
|
154
153
|
var TESTOPS_SCREENSHOT_ENV = "BS_TESTOPS_ALLOW_SCREENSHOTS";
|
|
155
154
|
var BROWSERSTACK_TESTHUB_UUID = "BROWSERSTACK_TESTHUB_UUID";
|
|
@@ -160,6 +159,8 @@ var BROWSERSTACK_ACCESSIBILITY = "BROWSERSTACK_ACCESSIBILITY";
|
|
|
160
159
|
var BROWSERSTACK_OBSERVABILITY = "BROWSERSTACK_OBSERVABILITY";
|
|
161
160
|
var MAX_GIT_META_DATA_SIZE_IN_BYTES = 64 * 1024;
|
|
162
161
|
var GIT_META_DATA_TRUNCATED = "...[TRUNCATED]";
|
|
162
|
+
var WDIO_NAMING_PREFIX = "WebdriverIO-";
|
|
163
|
+
var PERF_METRICS_WAIT_TIME = 2e3;
|
|
163
164
|
|
|
164
165
|
// src/bstackLogger.ts
|
|
165
166
|
var log = logger("@wdio/browserstack-service");
|
|
@@ -226,6 +227,32 @@ var BStackLogger = class {
|
|
|
226
227
|
}
|
|
227
228
|
};
|
|
228
229
|
|
|
230
|
+
// src/cli/apiUtils.ts
|
|
231
|
+
var APIUtils = class {
|
|
232
|
+
static FUNNEL_INSTRUMENTATION_URL = "https://api.browserstack.com/sdk/v1/event";
|
|
233
|
+
static BROWSERSTACK_AUTOMATE_API_URL = "https://api.browserstack.com";
|
|
234
|
+
static BROWSERSTACK_AA_API_URL = "https://api.browserstack.com";
|
|
235
|
+
static BROWSERSTACK_PERCY_API_URL = "https://api.browserstack.com";
|
|
236
|
+
static BROWSERSTACK_AUTOMATE_API_CLOUD_URL = "https://api-cloud.browserstack.com";
|
|
237
|
+
static BROWSERSTACK_AA_API_CLOUD_URL = "https://api-cloud.browserstack.com";
|
|
238
|
+
static APP_ALLY_ENDPOINT = "https://app-accessibility.browserstack.com/automate";
|
|
239
|
+
static DATA_ENDPOINT = "https://collector-observability.browserstack.com";
|
|
240
|
+
static UPLOAD_LOGS_ADDRESS = "https://upload-observability.browserstack.com";
|
|
241
|
+
static EDS_URL = "https://eds.browserstack.com";
|
|
242
|
+
static updateURLSForGRR(apis) {
|
|
243
|
+
this.FUNNEL_INSTRUMENTATION_URL = `${apis.automate.api}/sdk/v1/event`;
|
|
244
|
+
this.BROWSERSTACK_AUTOMATE_API_URL = apis.automate.api;
|
|
245
|
+
this.BROWSERSTACK_AA_API_URL = apis.appAutomate.api;
|
|
246
|
+
this.BROWSERSTACK_PERCY_API_URL = apis.percy.api;
|
|
247
|
+
this.BROWSERSTACK_AUTOMATE_API_CLOUD_URL = apis.automate.upload;
|
|
248
|
+
this.BROWSERSTACK_AA_API_CLOUD_URL = apis.appAutomate.upload;
|
|
249
|
+
this.APP_ALLY_ENDPOINT = `${apis.appAccessibility.api}/automate`;
|
|
250
|
+
this.DATA_ENDPOINT = apis.observability.api;
|
|
251
|
+
this.UPLOAD_LOGS_ADDRESS = apis.observability.upload;
|
|
252
|
+
this.EDS_URL = apis.edsInstrumentation.api;
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
|
|
229
256
|
// src/fetchWrapper.ts
|
|
230
257
|
import { fetch as undiciFetch, ProxyAgent } from "undici";
|
|
231
258
|
var ResponseError = class extends Error {
|
|
@@ -326,6 +353,7 @@ var PerformanceTester = class _PerformanceTester {
|
|
|
326
353
|
if (!this.started) {
|
|
327
354
|
return;
|
|
328
355
|
}
|
|
356
|
+
await _PerformanceTester.sleep(PERF_METRICS_WAIT_TIME);
|
|
329
357
|
try {
|
|
330
358
|
const eventsJson = JSON.stringify(this._measuredEvents);
|
|
331
359
|
const finalJSONStr = eventsJson.slice(1, -1) + ",";
|
|
@@ -337,7 +365,7 @@ var PerformanceTester = class _PerformanceTester {
|
|
|
337
365
|
if (!process.env[PERF_MEASUREMENT_ENV]) {
|
|
338
366
|
return;
|
|
339
367
|
}
|
|
340
|
-
await _PerformanceTester.sleep(
|
|
368
|
+
await _PerformanceTester.sleep(PERF_METRICS_WAIT_TIME);
|
|
341
369
|
this.started = false;
|
|
342
370
|
this.generateCSV(this._events);
|
|
343
371
|
const content = this.generateReport(this._events);
|
|
@@ -492,7 +520,7 @@ var PerformanceTester = class _PerformanceTester {
|
|
|
492
520
|
event_json: { measures, sdkRunId: process.env.SDK_RUN_ID }
|
|
493
521
|
}
|
|
494
522
|
};
|
|
495
|
-
const result = await fetchWrap(`${EDS_URL}/send_sdk_events`, {
|
|
523
|
+
const result = await fetchWrap(`${APIUtils.EDS_URL}/send_sdk_events`, {
|
|
496
524
|
method: "POST",
|
|
497
525
|
headers: {
|
|
498
526
|
"content-type": "application/json"
|
|
@@ -535,7 +563,15 @@ var EVENTS = {
|
|
|
535
563
|
SDK_TURBOSCALE: "sdk:turboscale",
|
|
536
564
|
SDK_PERCY: "sdk:percy",
|
|
537
565
|
SDK_PRE_INITIALIZE: "sdk:driver:pre-initialization",
|
|
538
|
-
SDK_POST_INITIALIZE: "sdk:driver:post-initialization"
|
|
566
|
+
SDK_POST_INITIALIZE: "sdk:driver:post-initialization",
|
|
567
|
+
SDK_CLI_CHECK_UPDATE: "sdk:cli:check-update",
|
|
568
|
+
SDK_CLI_DOWNLOAD: "sdk:cli:download",
|
|
569
|
+
SDK_CLI_ON_BOOTSTRAP: "sdk:cli:on-bootstrap",
|
|
570
|
+
SDK_CLI_ON_CONNECT: "sdk:cli:on-connect",
|
|
571
|
+
SDK_CLI_START: "sdk:cli:start",
|
|
572
|
+
SDK_CLI_ON_STOP: "sdk:cli:on-stop",
|
|
573
|
+
SDK_CONNECT_BIN_SESSION: "sdk:connectBinSession",
|
|
574
|
+
SDK_START_BIN_SESSION: "sdk:startBinSession"
|
|
539
575
|
};
|
|
540
576
|
var TESTHUB_EVENTS = {
|
|
541
577
|
START: `${EVENTS.SDK_TESTHUB}:start`,
|
|
@@ -691,7 +727,7 @@ var CrashReporter = class {
|
|
|
691
727
|
const data = {
|
|
692
728
|
hashed_id: process.env[BROWSERSTACK_TESTHUB_UUID],
|
|
693
729
|
observability_version: {
|
|
694
|
-
frameworkName:
|
|
730
|
+
frameworkName: WDIO_NAMING_PREFIX + (this.userConfigForReporting.framework || "null"),
|
|
695
731
|
sdkVersion: BSTACK_SERVICE_VERSION
|
|
696
732
|
},
|
|
697
733
|
exception: {
|
|
@@ -700,7 +736,7 @@ var CrashReporter = class {
|
|
|
700
736
|
},
|
|
701
737
|
config: this.userConfigForReporting
|
|
702
738
|
};
|
|
703
|
-
const url = `${DATA_ENDPOINT}/api/v1/analytics`;
|
|
739
|
+
const url = `${APIUtils.DATA_ENDPOINT}/api/v1/analytics`;
|
|
704
740
|
const encodedAuth = Buffer.from(`${this.credentialsForCrashReportUpload.username}:${this.credentialsForCrashReportUpload.password}`, "utf8").toString("base64");
|
|
705
741
|
const headers = {
|
|
706
742
|
...DEFAULT_REQUEST_CONFIG.headers,
|
|
@@ -712,7 +748,12 @@ var CrashReporter = class {
|
|
|
712
748
|
headers
|
|
713
749
|
});
|
|
714
750
|
if (response.ok) {
|
|
715
|
-
|
|
751
|
+
let body = await response.text();
|
|
752
|
+
try {
|
|
753
|
+
body = JSON.stringify(JSON.parse(body));
|
|
754
|
+
} catch {
|
|
755
|
+
}
|
|
756
|
+
BStackLogger.debug(`[Crash_Report_Upload] Success response: ${body}`);
|
|
716
757
|
} else {
|
|
717
758
|
BStackLogger.error(`[Crash_Report_Upload] Failed due to ${response.body}`);
|
|
718
759
|
}
|
|
@@ -1066,6 +1107,10 @@ var UsageStats = class _UsageStats {
|
|
|
1066
1107
|
};
|
|
1067
1108
|
var usageStats_default = UsageStats;
|
|
1068
1109
|
|
|
1110
|
+
// src/util.ts
|
|
1111
|
+
import tar from "tar";
|
|
1112
|
+
import { fileFromPath } from "formdata-node/file-from-path";
|
|
1113
|
+
|
|
1069
1114
|
// src/scripts/accessibility-scripts.ts
|
|
1070
1115
|
import path3 from "node:path";
|
|
1071
1116
|
import fs3 from "node:fs";
|
|
@@ -1235,7 +1280,7 @@ var processAccessibilityResponse = (response, options) => {
|
|
|
1235
1280
|
const result = jsonifyAccessibilityArray(response.accessibility.options.capabilities, "name", "value");
|
|
1236
1281
|
const scriptsJson = {
|
|
1237
1282
|
"scripts": jsonifyAccessibilityArray(response.accessibility.options.scripts, "name", "command"),
|
|
1238
|
-
"commands": response.accessibility.options.commandsToWrap
|
|
1283
|
+
"commands": response.accessibility.options.commandsToWrap?.commands ?? [],
|
|
1239
1284
|
"nonBStackInfraA11yChromeOptions": result["goog:chromeOptions"]
|
|
1240
1285
|
};
|
|
1241
1286
|
if (scannerVersion) {
|
|
@@ -1287,7 +1332,7 @@ var launchTestSession = PerformanceTester.measureWrapper(TESTHUB_EVENTS.START, o
|
|
|
1287
1332
|
},
|
|
1288
1333
|
browserstackAutomation: shouldAddServiceVersion(config, options.testObservability),
|
|
1289
1334
|
framework_details: {
|
|
1290
|
-
frameworkName:
|
|
1335
|
+
frameworkName: WDIO_NAMING_PREFIX + config.framework,
|
|
1291
1336
|
frameworkVersion: bsConfig.bstackServiceVersion,
|
|
1292
1337
|
sdkVersion: bsConfig.bstackServiceVersion,
|
|
1293
1338
|
language: "ECMAScript",
|
|
@@ -1312,7 +1357,7 @@ var launchTestSession = PerformanceTester.measureWrapper(TESTHUB_EVENTS.START, o
|
|
|
1312
1357
|
}
|
|
1313
1358
|
data.config = CrashReporter.userConfigForReporting;
|
|
1314
1359
|
try {
|
|
1315
|
-
const url = `${DATA_ENDPOINT}/api/v2/builds`;
|
|
1360
|
+
const url = `${APIUtils.DATA_ENDPOINT}/api/v2/builds`;
|
|
1316
1361
|
const encodedAuth = Buffer.from(`${getObservabilityUser(options, config)}:${getObservabilityKey(options, config)}`, "utf8").toString("base64");
|
|
1317
1362
|
const headers = {
|
|
1318
1363
|
...DEFAULT_REQUEST_CONFIG.headers,
|
|
@@ -1431,7 +1476,7 @@ var getAppA11yResults = PerformanceTester.measureWrapper(A11Y_EVENTS.GET_RESULTS
|
|
|
1431
1476
|
return [];
|
|
1432
1477
|
}
|
|
1433
1478
|
try {
|
|
1434
|
-
const apiUrl = `${APP_ALLY_ENDPOINT}/${APP_ALLY_ISSUES_ENDPOINT}`;
|
|
1479
|
+
const apiUrl = `${APIUtils.APP_ALLY_ENDPOINT}/${APP_ALLY_ISSUES_ENDPOINT}`;
|
|
1435
1480
|
const apiRespone = await getAppA11yResultResponse(apiUrl, isAppAutomate, browser, isBrowserStackSession, isAccessibility, sessionId);
|
|
1436
1481
|
const result = apiRespone?.data?.data?.issues;
|
|
1437
1482
|
BStackLogger.debug(`Polling Result: ${JSON.stringify(result)}`);
|
|
@@ -1451,7 +1496,7 @@ var getAppA11yResultsSummary = PerformanceTester.measureWrapper(A11Y_EVENTS.GET_
|
|
|
1451
1496
|
return {};
|
|
1452
1497
|
}
|
|
1453
1498
|
try {
|
|
1454
|
-
const apiUrl = `${APP_ALLY_ENDPOINT}/${APP_ALLY_ISSUES_SUMMARY_ENDPOINT}`;
|
|
1499
|
+
const apiUrl = `${APIUtils.APP_ALLY_ENDPOINT}/${APP_ALLY_ISSUES_SUMMARY_ENDPOINT}`;
|
|
1455
1500
|
const apiRespone = await getAppA11yResultResponse(apiUrl, isAppAutomate, browser, isBrowserStackSession, isAccessibility, sessionId);
|
|
1456
1501
|
const result = apiRespone?.data?.data?.summary;
|
|
1457
1502
|
BStackLogger.debug(`Polling Result: ${JSON.stringify(result)}`);
|
|
@@ -1512,7 +1557,7 @@ var stopBuildUpstream = PerformanceTester.measureWrapper(TESTHUB_EVENTS.STOP, o1
|
|
|
1512
1557
|
"stop_time": (/* @__PURE__ */ new Date()).toISOString()
|
|
1513
1558
|
};
|
|
1514
1559
|
try {
|
|
1515
|
-
const url = `${DATA_ENDPOINT}/api/v1/builds/${process.env[BROWSERSTACK_TESTHUB_UUID]}/stop`;
|
|
1560
|
+
const url = `${APIUtils.DATA_ENDPOINT}/api/v1/builds/${process.env[BROWSERSTACK_TESTHUB_UUID]}/stop`;
|
|
1516
1561
|
const response = await _fetch(url, {
|
|
1517
1562
|
method: "PUT",
|
|
1518
1563
|
headers: {
|
|
@@ -2060,7 +2105,7 @@ async function fireFunnelRequest(data) {
|
|
|
2060
2105
|
redactCredentialsFromFunnelData(data);
|
|
2061
2106
|
BStackLogger.debug("Sending SDK event with data " + util3.inspect(data, { depth: 6 }));
|
|
2062
2107
|
const encodedAuth = Buffer.from(`${userName}:${accessKey}`, "utf8").toString("base64");
|
|
2063
|
-
const response = await fetchWrap(FUNNEL_INSTRUMENTATION_URL, {
|
|
2108
|
+
const response = await fetchWrap(APIUtils.FUNNEL_INSTRUMENTATION_URL, {
|
|
2064
2109
|
method: "POST",
|
|
2065
2110
|
headers: {
|
|
2066
2111
|
"content-type": "application/json",
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export default class APIUtils {
|
|
2
|
+
static FUNNEL_INSTRUMENTATION_URL: string;
|
|
3
|
+
static BROWSERSTACK_AUTOMATE_API_URL: string;
|
|
4
|
+
static BROWSERSTACK_AA_API_URL: string;
|
|
5
|
+
static BROWSERSTACK_PERCY_API_URL: string;
|
|
6
|
+
static BROWSERSTACK_AUTOMATE_API_CLOUD_URL: string;
|
|
7
|
+
static BROWSERSTACK_AA_API_CLOUD_URL: string;
|
|
8
|
+
static APP_ALLY_ENDPOINT: string;
|
|
9
|
+
static DATA_ENDPOINT: string;
|
|
10
|
+
static UPLOAD_LOGS_ADDRESS: string;
|
|
11
|
+
static EDS_URL: string;
|
|
12
|
+
static updateURLSForGRR(apis: GRRUrls): void;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=apiUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiUtils.d.ts","sourceRoot":"","sources":["../../src/cli/apiUtils.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,QAAQ;IACzB,MAAM,CAAC,0BAA0B,SAA8C;IAC/E,MAAM,CAAC,6BAA6B,SAAiC;IACrE,MAAM,CAAC,uBAAuB,SAAiC;IAC/D,MAAM,CAAC,0BAA0B,SAAiC;IAClE,MAAM,CAAC,mCAAmC,SAAuC;IACjF,MAAM,CAAC,6BAA6B,SAAuC;IAC3E,MAAM,CAAC,iBAAiB,SAAwD;IAChF,MAAM,CAAC,aAAa,SAAqD;IACzE,MAAM,CAAC,mBAAmB,SAAkD;IAC5E,MAAM,CAAC,OAAO,SAAiC;IAE/C,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,OAAO;CAYxC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare class BStackLogger {
|
|
2
|
+
static logFilePath: string;
|
|
3
|
+
static logFolderPath: string;
|
|
4
|
+
private static logFileStream;
|
|
5
|
+
static logToFile(logMessage: string, logLevel: string): void;
|
|
6
|
+
private static formatLog;
|
|
7
|
+
static info(message: string): void;
|
|
8
|
+
static error(message: string): void;
|
|
9
|
+
static debug(message: string, param?: unknown): void;
|
|
10
|
+
static warn(message: string): void;
|
|
11
|
+
static trace(message: string): void;
|
|
12
|
+
static clearLogger(): void;
|
|
13
|
+
static clearLogFile(): void;
|
|
14
|
+
static ensureLogsFolder(): void;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=cliLogger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cliLogger.d.ts","sourceRoot":"","sources":["../../src/cli/cliLogger.ts"],"names":[],"mappings":"AAWA,qBAAa,YAAY;IACrB,OAAc,WAAW,SAAsC;IAC/D,OAAc,aAAa,SAAmC;IAC9D,OAAO,CAAC,MAAM,CAAC,aAAa,CAAuB;IAEnD,MAAM,CAAC,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAcrD,OAAO,CAAC,MAAM,CAAC,SAAS;WAIV,IAAI,CAAC,OAAO,EAAE,MAAM;WAKpB,KAAK,CAAC,OAAO,EAAE,MAAM;WAKrB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO;WAStC,IAAI,CAAC,OAAO,EAAE,MAAM;WAKpB,KAAK,CAAC,OAAO,EAAE,MAAM;WAKrB,WAAW;WAOX,YAAY;WAMZ,gBAAgB;CAKjC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import type { Options, Capabilities } from '@wdio/types';
|
|
3
|
+
import type { BrowserstackConfig, BrowserstackOptions, TestObservabilityOptions } from '../types.js';
|
|
4
|
+
export declare class CLIUtils {
|
|
5
|
+
static automationFrameworkDetail: {};
|
|
6
|
+
static testFrameworkDetail: {};
|
|
7
|
+
static CLISupportedFrameworks: string[];
|
|
8
|
+
static isDevelopmentEnv(): boolean;
|
|
9
|
+
static getCLIParamsForDevEnv(): Record<string, string>;
|
|
10
|
+
/**
|
|
11
|
+
* Build config object for binary session request
|
|
12
|
+
* @returns {string}
|
|
13
|
+
* @throws {Error}
|
|
14
|
+
*/
|
|
15
|
+
static getBinConfig(config: Options.Testrunner, capabilities: Capabilities.TestrunnerCapabilities | WebdriverIO.Capabilities, options: BrowserstackConfig & BrowserstackOptions, buildTag?: string): string;
|
|
16
|
+
static getSdkVersion(): string;
|
|
17
|
+
static getSdkLanguage(): string;
|
|
18
|
+
static setupCliPath(config: Options.Testrunner): Promise<string | null>;
|
|
19
|
+
static checkAndUpdateCli(existingCliPath: string, cliDir: string, config: Options.Testrunner): Promise<string | null>;
|
|
20
|
+
static getCliDir(): string;
|
|
21
|
+
static getWritableDir(): string | null | undefined;
|
|
22
|
+
static getExistingCliPath(cliDir: string): string;
|
|
23
|
+
static requestToUpdateCLI: (queryParams: Record<string, string>, config: Options.Testrunner) => Promise<any>;
|
|
24
|
+
static runShellCommand(cmdCommand: string, workingDir?: string): Promise<string>;
|
|
25
|
+
static downloadLatestBinary: (binDownloadUrl: string, cliDir: string) => Promise<string | null>;
|
|
26
|
+
static downloadFileStream(downloadedFileStream: fs.WriteStream, binaryName: string | null, zipFilePath: string, cliDir: string, resolve: (path: string) => void, reject: (reason?: Error) => void): void;
|
|
27
|
+
static getTestFrameworkDetail(): any;
|
|
28
|
+
static getAutomationFrameworkDetail(): any;
|
|
29
|
+
static setFrameworkDetail(testFramework: string, automationFramework: string): void;
|
|
30
|
+
/**
|
|
31
|
+
* Get the current instance name using thread id and processId
|
|
32
|
+
* @returns {string}
|
|
33
|
+
*/
|
|
34
|
+
static getCurrentInstanceName(): string;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @param {TestFrameworkState | AutomationFrameworkState} frameworkState
|
|
38
|
+
* @param {HookState} hookState
|
|
39
|
+
* @returns {string}
|
|
40
|
+
*/
|
|
41
|
+
static getHookRegistryKey(frameworkState: State, hookState: State): string;
|
|
42
|
+
static matchHookRegex(hookState: string): boolean;
|
|
43
|
+
static getObservabilityBuildTags(observabilityOptions: TestObservabilityOptions, bstackBuildTag?: string): string[];
|
|
44
|
+
static checkCLISupportedFrameworks(framework: string | undefined): boolean;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=cliUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cliUtils.d.ts","sourceRoot":"","sources":["../../src/cli/cliUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AA8BxB,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAIpG,qBAAa,QAAQ;IACjB,MAAM,CAAC,yBAAyB,KAAK;IACrC,MAAM,CAAC,mBAAmB,KAAK;IAC/B,MAAM,CAAC,sBAAsB,WAAY;IAEzC,MAAM,CAAC,gBAAgB;IAIvB,MAAM,CAAC,qBAAqB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAOtD;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,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mBAAmB,EAAE,MAAM;IAmB5E;;;OAGG;IACH,MAAM,CAAC,sBAAsB;IAI7B;;;;;OAKG;IACH,MAAM,CAAC,kBAAkB,CAAC,cAAc,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK;IAIjE,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,MAAM;IAMvC,MAAM,CAAC,yBAAyB,CAAC,oBAAoB,EAAE,wBAAwB,EAAE,cAAc,CAAC,EAAE,MAAM;IAaxG,MAAM,CAAC,2BAA2B,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS;CAOnE"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EventDispatcher - Singleton class for event handling
|
|
3
|
+
*/
|
|
4
|
+
declare class EventDispatcher {
|
|
5
|
+
#private;
|
|
6
|
+
observers: Record<string, Function[]>;
|
|
7
|
+
constructor();
|
|
8
|
+
/**
|
|
9
|
+
* Get the EventDispatcher singleton instance
|
|
10
|
+
* @returns {EventDispatcher} The singleton instance
|
|
11
|
+
*/
|
|
12
|
+
static getInstance(): EventDispatcher;
|
|
13
|
+
/**
|
|
14
|
+
* Add event observer
|
|
15
|
+
* @param {string} event - Event name
|
|
16
|
+
* @param {Function} callback - Callback function
|
|
17
|
+
*/
|
|
18
|
+
registerObserver(hookRegistryKey: string, callback: Function): void;
|
|
19
|
+
/**
|
|
20
|
+
* Notify registered observers on an event
|
|
21
|
+
* @param {string} event - Event name
|
|
22
|
+
* @param {*} data - Event data
|
|
23
|
+
*/
|
|
24
|
+
notifyObserver(event: string, args: unknown): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
export declare const eventDispatcher: EventDispatcher;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=eventDispatcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eventDispatcher.d.ts","sourceRoot":"","sources":["../../src/cli/eventDispatcher.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAM,eAAe;;IAGjB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAA;;IAMrC;;;KAGC;IACD,MAAM,CAAC,WAAW;IAOlB;;;;KAIC;IACD,gBAAgB,CAAC,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ;IAQ5D;;;;KAIC;IACK,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO;CAQpD;AAGD,eAAO,MAAM,eAAe,iBAAgC,CAAA"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type AutomationFrameworkInstance from '../instances/automationFrameworkInstance.js';
|
|
2
|
+
import type TrackedContext from '../instances/trackedContext.js';
|
|
3
|
+
/**
|
|
4
|
+
* AutomationFramework - Automation Framework abstract class
|
|
5
|
+
*/
|
|
6
|
+
export default class AutomationFramework {
|
|
7
|
+
#private;
|
|
8
|
+
static instances: Map<any, any>;
|
|
9
|
+
static KEY_AUTOMATION_SESSIONS: string;
|
|
10
|
+
static KEY_NON_BROWSERSTACK_AUTOMATION_SESSIONS: string;
|
|
11
|
+
/**
|
|
12
|
+
* Constructor for the AutomationFramework
|
|
13
|
+
* @param {string} automationFrameworkName - Name of the automation framework
|
|
14
|
+
* @param {string} automationFrameworkVersion - Version of the automation framework
|
|
15
|
+
*/
|
|
16
|
+
constructor(automationFrameworkName: string, automationFrameworkVersion: string);
|
|
17
|
+
/**
|
|
18
|
+
* Get the automation framework name
|
|
19
|
+
* @returns {string} The name of the automation framework
|
|
20
|
+
*/
|
|
21
|
+
getAutomationFrameworkName(): string;
|
|
22
|
+
/**
|
|
23
|
+
* Get the automation framework version
|
|
24
|
+
* @returns {string} The version of the automation framework
|
|
25
|
+
*/
|
|
26
|
+
getAutomationFrameworkVersion(): string;
|
|
27
|
+
/**
|
|
28
|
+
* Track an event
|
|
29
|
+
* @param {Object}
|
|
30
|
+
* @param {Object}
|
|
31
|
+
* @param {Object}
|
|
32
|
+
* @returns {void}
|
|
33
|
+
*/
|
|
34
|
+
trackEvent(automationFrameworkState: State, hookState: State, args?: unknown): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @param {*} instance
|
|
38
|
+
* @param {*} automationFrameworkState
|
|
39
|
+
* @param {*} hookState
|
|
40
|
+
* @param {*} args
|
|
41
|
+
*/
|
|
42
|
+
runHooks(instance: AutomationFrameworkInstance, automationFrameworkState: State, hookState: State, args?: unknown): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Register an observer
|
|
45
|
+
* @returns {void}
|
|
46
|
+
*/
|
|
47
|
+
static registerObserver(automationFrameworkState: State, hookState: State, callback: Function): void;
|
|
48
|
+
/**
|
|
49
|
+
* Set the tracked instance
|
|
50
|
+
* @param {TrackedInstance} context - The context
|
|
51
|
+
* @param {TrackedInstance} instance - The instance
|
|
52
|
+
* @returns {void}
|
|
53
|
+
*/
|
|
54
|
+
static setTrackedInstance(context: TrackedContext, instance: AutomationFrameworkInstance): void;
|
|
55
|
+
/**
|
|
56
|
+
* Get the tracked instance
|
|
57
|
+
* @returns {TrackedInstance} The tracked instance
|
|
58
|
+
*/
|
|
59
|
+
static getTrackedInstance(): any;
|
|
60
|
+
/**
|
|
61
|
+
* Set the state
|
|
62
|
+
* @param {TrackedInstance} instance - The instance
|
|
63
|
+
* @param {string} key - The key
|
|
64
|
+
* @param {*} value - The value
|
|
65
|
+
* @returns
|
|
66
|
+
*/
|
|
67
|
+
static setState(instance: AutomationFrameworkInstance, key: string, value: unknown): void;
|
|
68
|
+
/**
|
|
69
|
+
* Get the state
|
|
70
|
+
* @param {TrackedInstance} instance - The instance
|
|
71
|
+
* @param {string} key - The key
|
|
72
|
+
* @returns {*} The state
|
|
73
|
+
*/
|
|
74
|
+
static getState(instance: AutomationFrameworkInstance, key: string): any;
|
|
75
|
+
static isAutomationSession(instance: AutomationFrameworkInstance): boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Set the driver for the automation framework instance
|
|
78
|
+
* @param {AutomationFrameworkInstance} instance - The automation framework instance
|
|
79
|
+
* @param {*} driver - The driver object
|
|
80
|
+
*/
|
|
81
|
+
static setDriver(instance: AutomationFrameworkInstance, driver: unknown): void;
|
|
82
|
+
/**
|
|
83
|
+
* Get the driver from the automation framework instance
|
|
84
|
+
* @param {AutomationFrameworkInstance} instance - The automation framework instance
|
|
85
|
+
* @returns {*} The driver object or null
|
|
86
|
+
*/
|
|
87
|
+
static getDriver(instance: AutomationFrameworkInstance): unknown;
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=automationFramework.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"automationFramework.d.ts","sourceRoot":"","sources":["../../../src/cli/frameworks/automationFramework.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,2BAA2B,MAAM,6CAA6C,CAAA;AAC1F,OAAO,KAAK,cAAc,MAAM,gCAAgC,CAAA;AAGhE;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,mBAAmB;;IAIpC,MAAM,CAAC,SAAS,gBAAY;IAC5B,MAAM,CAAC,uBAAuB,SAAwB;IACtD,MAAM,CAAC,wCAAwC,SAAyC;IAExF;;;;IAIA;gBACY,uBAAuB,EAAE,MAAM,EAAE,0BAA0B,EAAE,MAAM;IAK/E;;;KAGC;IACD,0BAA0B;IAI1B;;;KAGC;IACD,6BAA6B;IAI7B;;;;;;KAMC;IACK,UAAU,CAAC,wBAAwB,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,GAAE,OAAY;IAItF;;;;;;KAMC;IACK,QAAQ,CAAC,QAAQ,EAAE,2BAA2B,EAAE,wBAAwB,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,GAAE,OAAY;IAO3H;;;KAGC;IACD,MAAM,CAAC,gBAAgB,CAAC,wBAAwB,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ;IAI7F;;;;;KAKC;IACD,MAAM,CAAC,kBAAkB,CAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,2BAA2B;IAKxF;;;KAGC;IACD,MAAM,CAAC,kBAAkB;IAMzB;;;;;;KAMC;IACD,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,2BAA2B,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;IAIlF;;;;;KAKC;IACD,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,2BAA2B,EAAE,GAAG,EAAE,MAAM;IAIlE,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,2BAA2B,GAAG,OAAO;IAI1E;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,2BAA2B,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI;IAQ9E;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,2BAA2B,GAAG,OAAO;CAKnE"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const AutomationFrameworkConstants: {
|
|
2
|
+
ENV_BROWSERSTACK_PLATFORM_INDEX: string;
|
|
3
|
+
KEY_HUB_URL: string;
|
|
4
|
+
KEY_FRAMEWORK_SESSION_ID: string;
|
|
5
|
+
KEY_INPUT_CAPABILITIES: string;
|
|
6
|
+
KEY_CAPABILITIES: string;
|
|
7
|
+
KEY_IS_BROWSERSTACK_HUB: string;
|
|
8
|
+
KEY_STARTED_AT: string;
|
|
9
|
+
KEY_ENDED_AT: string;
|
|
10
|
+
KEY_PLATFORM_INDEX: string;
|
|
11
|
+
COMMAND_NEW_SESSION: string;
|
|
12
|
+
COMMAND_GET: string;
|
|
13
|
+
COMMAND_SCREENSHOT: string;
|
|
14
|
+
COMMAND_W3C_EXECUTE_SCRIPT: string;
|
|
15
|
+
COMMAND_W3C_EXECUTE_SCRIPT_ASYNC: string;
|
|
16
|
+
COMMAND_QUIT: string;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=automationFrameworkConstants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"automationFrameworkConstants.d.ts","sourceRoot":"","sources":["../../../../src/cli/frameworks/constants/automationFrameworkConstants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;CAgBxC,CAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare const TestFrameworkConstants: {
|
|
2
|
+
KEY_TEST_UUID: string;
|
|
3
|
+
KEY_TEST_ID: string;
|
|
4
|
+
KEY_TEST_NAME: string;
|
|
5
|
+
KEY_TEST_FILE_PATH: string;
|
|
6
|
+
KEY_TEST_TAGS: string;
|
|
7
|
+
KEY_TEST_RESULT: string;
|
|
8
|
+
KEY_TEST_RESULT_AT: string;
|
|
9
|
+
KEY_TEST_STARTED_AT: string;
|
|
10
|
+
KEY_TEST_ENDED_AT: string;
|
|
11
|
+
KEY_TEST_LOCATION: string;
|
|
12
|
+
KEY_TEST_SCOPE: string;
|
|
13
|
+
KEY_TEST_SCOPES: string;
|
|
14
|
+
KEY_TEST_FRAMEWORK_NAME: string;
|
|
15
|
+
KEY_TEST_FRAMEWORK_VERSION: string;
|
|
16
|
+
KEY_TEST_CODE: string;
|
|
17
|
+
KEY_TEST_RERUN_NAME: string;
|
|
18
|
+
KEY_PLATFORM_INDEX: string;
|
|
19
|
+
KEY_TEST_FAILURE: string;
|
|
20
|
+
KEY_TEST_FAILURE_TYPE: string;
|
|
21
|
+
KEY_TEST_FAILURE_REASON: string;
|
|
22
|
+
KEY_TEST_LOGS: string;
|
|
23
|
+
KEY_TEST_META: string;
|
|
24
|
+
KEY_TEST_DEFERRED: string;
|
|
25
|
+
KEY_SESSION_NAME: string;
|
|
26
|
+
KEY_AUTOMATE_SESSION_NAME: string;
|
|
27
|
+
KEY_AUTOMATE_SESSION_STATUS: string;
|
|
28
|
+
KEY_AUTOMATE_SESSION_REASON: string;
|
|
29
|
+
KEY_EVENT_STARTED_AT: string;
|
|
30
|
+
KEY_EVENT_ENDED_AT: string;
|
|
31
|
+
KEY_HOOK_ID: string;
|
|
32
|
+
KEY_HOOK_RESULT: string;
|
|
33
|
+
KEY_HOOK_LOGS: string;
|
|
34
|
+
KEY_HOOK_NAME: string;
|
|
35
|
+
KEY_HOOKS_STARTED: string;
|
|
36
|
+
KEY_HOOKS_FINISHED: string;
|
|
37
|
+
DEFAULT_TEST_RESULT: string;
|
|
38
|
+
DEFAULT_HOOK_RESULT: string;
|
|
39
|
+
KIND_SCREENSHOT: string;
|
|
40
|
+
KIND_LOG: string;
|
|
41
|
+
HOOK_REGEX: string;
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=testFrameworkConstants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testFrameworkConstants.d.ts","sourceRoot":"","sources":["../../../../src/cli/frameworks/constants/testFrameworkConstants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyClC,CAAA"}
|