@wdio/browserstack-service 8.46.0 → 8.47.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.
Files changed (118) hide show
  1. package/README.md +44 -11
  2. package/build/Percy/Percy-Handler.d.ts.map +1 -1
  3. package/build/Percy/Percy-Handler.js +4 -1
  4. package/build/Percy/Percy.d.ts.map +1 -1
  5. package/build/Percy/Percy.js +2 -1
  6. package/build/accessibility-handler.d.ts +6 -3
  7. package/build/accessibility-handler.d.ts.map +1 -1
  8. package/build/accessibility-handler.js +8 -5
  9. package/build/cleanup.js +3 -3
  10. package/build/cli/apiUtils.d.ts +14 -0
  11. package/build/cli/apiUtils.d.ts.map +1 -0
  12. package/build/cli/apiUtils.js +24 -0
  13. package/build/cli/cliLogger.d.ts +16 -0
  14. package/build/cli/cliLogger.d.ts.map +1 -0
  15. package/build/cli/cliLogger.js +70 -0
  16. package/build/cli/cliUtils.d.ts +46 -0
  17. package/build/cli/cliUtils.d.ts.map +1 -0
  18. package/build/cli/cliUtils.js +430 -0
  19. package/build/cli/eventDispatcher.d.ts +28 -0
  20. package/build/cli/eventDispatcher.d.ts.map +1 -0
  21. package/build/cli/eventDispatcher.js +48 -0
  22. package/build/cli/frameworks/automationFramework.d.ts +89 -0
  23. package/build/cli/frameworks/automationFramework.d.ts.map +1 -0
  24. package/build/cli/frameworks/automationFramework.js +131 -0
  25. package/build/cli/frameworks/constants/automationFrameworkConstants.d.ts +18 -0
  26. package/build/cli/frameworks/constants/automationFrameworkConstants.d.ts.map +1 -0
  27. package/build/cli/frameworks/constants/automationFrameworkConstants.js +17 -0
  28. package/build/cli/frameworks/constants/testFrameworkConstants.d.ts +43 -0
  29. package/build/cli/frameworks/constants/testFrameworkConstants.d.ts.map +1 -0
  30. package/build/cli/frameworks/constants/testFrameworkConstants.js +42 -0
  31. package/build/cli/frameworks/testFramework.d.ts +89 -0
  32. package/build/cli/frameworks/testFramework.d.ts.map +1 -0
  33. package/build/cli/frameworks/testFramework.js +125 -0
  34. package/build/cli/frameworks/wdioAutomationFramework.d.ts +28 -0
  35. package/build/cli/frameworks/wdioAutomationFramework.d.ts.map +1 -0
  36. package/build/cli/frameworks/wdioAutomationFramework.js +66 -0
  37. package/build/cli/frameworks/wdioMochaTestFramework.d.ts +82 -0
  38. package/build/cli/frameworks/wdioMochaTestFramework.d.ts.map +1 -0
  39. package/build/cli/frameworks/wdioMochaTestFramework.js +319 -0
  40. package/build/cli/grpcClient.d.ts +70 -0
  41. package/build/cli/grpcClient.d.ts.map +1 -0
  42. package/build/cli/grpcClient.js +419 -0
  43. package/build/cli/index.d.ts +148 -0
  44. package/build/cli/index.d.ts.map +1 -0
  45. package/build/cli/index.js +415 -0
  46. package/build/cli/instances/automationFrameworkInstance.d.ts +33 -0
  47. package/build/cli/instances/automationFrameworkInstance.d.ts.map +1 -0
  48. package/build/cli/instances/automationFrameworkInstance.js +44 -0
  49. package/build/cli/instances/testFrameworkInstance.d.ts +62 -0
  50. package/build/cli/instances/testFrameworkInstance.d.ts.map +1 -0
  51. package/build/cli/instances/testFrameworkInstance.js +96 -0
  52. package/build/cli/instances/trackedContext.d.ts +32 -0
  53. package/build/cli/instances/trackedContext.d.ts.map +1 -0
  54. package/build/cli/instances/trackedContext.js +47 -0
  55. package/build/cli/instances/trackedInstance.d.ts +40 -0
  56. package/build/cli/instances/trackedInstance.d.ts.map +1 -0
  57. package/build/cli/instances/trackedInstance.js +63 -0
  58. package/build/cli/modules/accessibilityModule.d.ts +33 -0
  59. package/build/cli/modules/accessibilityModule.d.ts.map +1 -0
  60. package/build/cli/modules/accessibilityModule.js +347 -0
  61. package/build/cli/modules/automateModule.d.ts +26 -0
  62. package/build/cli/modules/automateModule.d.ts.map +1 -0
  63. package/build/cli/modules/automateModule.js +222 -0
  64. package/build/cli/modules/baseModule.d.ts +33 -0
  65. package/build/cli/modules/baseModule.d.ts.map +1 -0
  66. package/build/cli/modules/baseModule.js +51 -0
  67. package/build/cli/modules/observabilityModule.d.ts +22 -0
  68. package/build/cli/modules/observabilityModule.d.ts.map +1 -0
  69. package/build/cli/modules/observabilityModule.js +45 -0
  70. package/build/cli/modules/percyModule.d.ts +19 -0
  71. package/build/cli/modules/percyModule.d.ts.map +1 -0
  72. package/build/cli/modules/percyModule.js +77 -0
  73. package/build/cli/modules/testHubModule.d.ts +30 -0
  74. package/build/cli/modules/testHubModule.d.ts.map +1 -0
  75. package/build/cli/modules/testHubModule.js +232 -0
  76. package/build/cli/modules/webdriverIOModule.d.ts +29 -0
  77. package/build/cli/modules/webdriverIOModule.d.ts.map +1 -0
  78. package/build/cli/modules/webdriverIOModule.js +128 -0
  79. package/build/cli/states/automationFrameworkState.d.ts +65 -0
  80. package/build/cli/states/automationFrameworkState.d.ts.map +1 -0
  81. package/build/cli/states/automationFrameworkState.js +61 -0
  82. package/build/cli/states/hookState.d.ts +45 -0
  83. package/build/cli/states/hookState.d.ts.map +1 -0
  84. package/build/cli/states/hookState.js +43 -0
  85. package/build/cli/states/testFrameworkState.d.ts +125 -0
  86. package/build/cli/states/testFrameworkState.d.ts.map +1 -0
  87. package/build/cli/states/testFrameworkState.js +115 -0
  88. package/build/constants.d.ts +13 -0
  89. package/build/constants.d.ts.map +1 -1
  90. package/build/constants.js +21 -1
  91. package/build/crash-reporter.d.ts.map +1 -1
  92. package/build/crash-reporter.js +4 -3
  93. package/build/exitHandler.d.ts.map +1 -1
  94. package/build/exitHandler.js +47 -5
  95. package/build/insights-handler.d.ts +2 -0
  96. package/build/insights-handler.d.ts.map +1 -1
  97. package/build/insights-handler.js +29 -1
  98. package/build/instrumentation/funnelInstrumentation.d.ts.map +1 -1
  99. package/build/instrumentation/funnelInstrumentation.js +5 -4
  100. package/build/instrumentation/performance/constants.d.ts +8 -0
  101. package/build/instrumentation/performance/constants.d.ts.map +1 -1
  102. package/build/instrumentation/performance/constants.js +9 -1
  103. package/build/instrumentation/performance/performance-tester.d.ts.map +1 -1
  104. package/build/instrumentation/performance/performance-tester.js +5 -3
  105. package/build/launcher.d.ts.map +1 -1
  106. package/build/launcher.js +94 -51
  107. package/build/request-handler.js +1 -1
  108. package/build/service.d.ts +1 -1
  109. package/build/service.d.ts.map +1 -1
  110. package/build/service.js +185 -107
  111. package/build/testOps/requestUtils.js +3 -2
  112. package/build/types.d.ts +29 -3
  113. package/build/types.d.ts.map +1 -1
  114. package/build/util.d.ts +13 -1
  115. package/build/util.d.ts.map +1 -1
  116. package/build/util.js +173 -27
  117. package/package.json +5 -2
  118. package/tsconfig.prod.tsbuildinfo +1 -1
package/README.md CHANGED
@@ -28,8 +28,8 @@ export const config = {
28
28
  key: process.env.BROWSERSTACK_ACCESS_KEY,
29
29
  services: [
30
30
  ['browserstack', {
31
- testObservability: true,
32
- testObservabilityOptions: {
31
+ testReporting: true,
32
+ testReportingOptions: {
33
33
  projectName: "Your project name goes here",
34
34
  buildName: "The static build job name goes here e.g. Nightly regression"
35
35
  },
@@ -44,16 +44,15 @@ export const config = {
44
44
 
45
45
  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.
46
46
 
47
- ### testObservability
47
+ ### testReporting (formerly testObservability)
48
48
 
49
- Test Observability is an advanced test reporting tool that gives insights to improve your automation tests and helps you debug faster. Its enabled by default by setting the testObservability​ flag as true for all users of browserstack-service. You can disable this by setting the testObservability​ flag to false.
49
+ Test Reporting and Analytics is an advanced test reporting tool that gives insights to improve your automation tests and helps you debug faster. It's enabled by default by setting the testReporting flag as true for all users of browserstack-service. You can disable this by setting the testReporting flag to false.
50
50
 
51
- Once your tests finish running, you can visit [Test Observability](https://observability.browserstack.com/?utm_source=webdriverio&utm_medium=partnered&utm_campaign=documentation) to debug your builds with additional insights like Unique Error Analysis, Automatic Flaky Test Detection, and more.
51
+ Once your tests finish running, you can visit [Test Reporting and Analytics](https://automation.browserstack.com/?utm_source=webdriverio&utm_medium=partnered&utm_campaign=documentation) to debug your builds with additional insights like Unique Error Analysis, Automatic Flaky Test Detection, and more.
52
52
 
53
- You can use Test Observability even if you dont run your tests on the BrowserStack infrastructure. Even if you run your tests on a CI, a local machine, or even on other cloud service providers, Test Observability can still generate intelligent test reports and advanced analytics on your tests.
54
-
55
- If you want to use Test Observability without running your tests on BrowserStack infrastructure, you can set your config as follows:
53
+ You can use Test Reporting and Analytics even if you don't run your tests on the BrowserStack infrastructure. Even if you run your tests on a CI, a local machine, or even on other cloud service providers, Test Reporting and Analytics can still generate intelligent test reports and advanced analytics on your tests.
56
54
 
55
+ If you want to use Test Reporting and Analytics without running your tests on BrowserStack infrastructure, you can set your config as follows:
57
56
 
58
57
  ```js
59
58
  // wdio.conf.js
@@ -61,8 +60,29 @@ export const config = {
61
60
  // ...
62
61
  services: [
63
62
  ['browserstack', {
64
- testObservability: true,
65
- testObservabilityOptions: {
63
+ testReporting: true,
64
+ testReportingOptions: {
65
+ user: process.env.BROWSERSTACK_USERNAME,
66
+ key: process.env.BROWSERSTACK_ACCESS_KEY,
67
+ projectName: "Your project name goes here",
68
+ buildName: "The static build job name goes here e.g. Nightly regression"
69
+ }
70
+ }]
71
+ ],
72
+ // ...
73
+ };
74
+ ```
75
+
76
+ For backward compatibility, the legacy `testObservability` and `testObservabilityOptions` flags are still supported:
77
+
78
+ ```js
79
+ // wdio.conf.js (legacy configuration)
80
+ export const config = {
81
+ // ...
82
+ services: [
83
+ ['browserstack', {
84
+ testObservability: true, // deprecated, use testReporting instead
85
+ testObservabilityOptions: { // deprecated, use testReportingOptions instead
66
86
  user: process.env.BROWSERSTACK_USERNAME,
67
87
  key: process.env.BROWSERSTACK_ACCESS_KEY,
68
88
  projectName: "Your project name goes here",
@@ -74,7 +94,20 @@ export const config = {
74
94
  };
75
95
  ```
76
96
 
77
- You can explore all the features of Test Observability in [this sandbox](https://observability-demo.browserstack.com/?utm_source=webdriverio&utm_medium=partnered&utm_campaign=documentation) or read more about it [here](https://www.browserstack.com/docs/test-observability/overview/what-is-test-observability?utm_source=webdriverio&utm_medium=partnered&utm_campaign=documentation).
97
+ #### Environment Variables
98
+
99
+ The following environment variables are supported:
100
+
101
+ **New (recommended):**
102
+ - `BROWSERSTACK_TEST_REPORTING` - Enable/disable test reporting
103
+ - `BROWSERSTACK_TEST_REPORTING_DEBUG` - Enable debug mode for test reporting
104
+ - `TEST_REPORTING_BUILD_TAG` - Comma-separated build tags
105
+
106
+ **Legacy (still supported):**
107
+ - `BROWSERSTACK_OBSERVABILITY` - Enable/disable test observability (deprecated)
108
+ - `TEST_OBSERVABILITY_BUILD_TAG` - Comma-separated build tags (deprecated)
109
+
110
+ You can explore all the features of Test Reporting and Analytics in [this sandbox](https://automation-demo.browserstack.com/?utm_source=webdriverio&utm_medium=partnered&utm_campaign=documentation) or read more about it [here](https://www.browserstack.com/docs/test-reporting/overview/what-is-test-reporting?utm_source=webdriverio&utm_medium=partnered&utm_campaign=documentation).
78
111
 
79
112
  ### browserstackLocal
80
113
  Set this to true to enable routing connections from BrowserStack cloud through your computer.
@@ -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;IAUX,OAAO,CAAC,qBAAqB;IAC7B,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,cAAc,CAAC;IACvB,OAAO,CAAC,UAAU,CAAC;IAbvB,OAAO,CAAC,aAAa,CAA6B;IAClD,OAAO,CAAC,YAAY,CAAC,CAAQ;IAC7B,OAAO,CAAC,iCAAiC,CAAC,CAAiB;IAC3D,OAAO,CAAC,uBAAuB,CAAS;IACxC,OAAO,CAAC,yBAAyB,CAAU;IAC3C,OAAO,CAAC,wBAAwB,CAAY;IAC5C,OAAO,CAAC,gBAA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AAC,iCAAiC,CAAC,CAAiB;IAC3D,OAAO,CAAC,uBAAuB,CAAS;IACxC,OAAO,CAAC,yBAAyB,CAAU;IAC3C,OAAO,CAAC,wBAAwB,CAAY;IAC5C,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,gBAAgB,EAC5C,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;IAyBrE,MAAM;IAIZ,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;IAM1D,oBAAoB,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO;IA+BhD,0BAA0B;IAS1B,oBAAoB,CAAE,IAAI,EAAE,iBAAiB;IAoB7C,mBAAmB,CAAE,IAAI,EAAE,iBAAiB,GAAG,gBAAgB;IA0B/D,SAAS;IAMT,aAAa;CAKtB;AAGD,QAAA,MAAM,YAAY,EAAE,OAAO,aAAoD,CAAA;AAC/E,KAAK,YAAY,GAAG,aAAa,CAAA;AAEjC,eAAe,YAAY,CAAA"}
@@ -49,7 +49,10 @@ class _PercyHandler {
49
49
  this._percyScreenshotCounter += 1;
50
50
  }
51
51
  this._percyCaptureMap?.increment(sessionName ? sessionName : this._sessionName, eventName);
52
- await (this._isAppAutomate ? PercySDK.screenshotApp(this._percyCaptureMap?.getName(sessionName ? sessionName : this._sessionName, eventName)) : await PercySDK.screenshot(this._browser, this._percyCaptureMap?.getName(sessionName ? sessionName : this._sessionName, eventName)));
52
+ const performanceEventName = this._isAppAutomate ? PERFORMANCE_SDK_EVENTS.PERCY_EVENTS.SCREENSHOT_APP : PERFORMANCE_SDK_EVENTS.PERCY_EVENTS.SCREENSHOT;
53
+ await PerformanceTester.measureWrapper(performanceEventName, async () => {
54
+ await (this._isAppAutomate ? PercySDK.screenshotApp(this._percyCaptureMap?.getName(sessionName ? sessionName : this._sessionName, eventName)) : await PercySDK.screenshot(this._browser, this._percyCaptureMap?.getName(sessionName ? sessionName : this._sessionName, eventName)));
55
+ })();
53
56
  this._percyScreenshotCounter -= 1;
54
57
  }
55
58
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Percy.d.ts","sourceRoot":"","sources":["../../src/Percy/Percy.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAO1C,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;IA4CL,IAAI;IAWV,SAAS;IAIH,eAAe;IAoCf,iBAAiB;CA8B1B;AAED,eAAe,KAAK,CAAA"}
1
+ {"version":3,"file":"Percy.d.ts","sourceRoot":"","sources":["../../src/Percy/Percy.ts"],"names":[],"mappings":"AAWA,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;IA4CL,IAAI;IAWV,SAAS;IAIH,eAAe;IAoCf,iBAAiB;CA8B1B;AAED,eAAe,KAAK,CAAA"}
@@ -14,6 +14,7 @@ import PercyBinary from './PercyBinary.js';
14
14
  import { BROWSERSTACK_TESTHUB_UUID } from '../constants.js';
15
15
  import PerformanceTester from '../instrumentation/performance/performance-tester.js';
16
16
  import * as PERFORMANCE_SDK_EVENTS from '../instrumentation/performance/constants.js';
17
+ import APIUtils from '../cli/apiUtils.js';
17
18
  const logDir = 'logs';
18
19
  class Percy {
19
20
  #logfile = path.join(logDir, 'percy.log');
@@ -118,7 +119,7 @@ class Percy {
118
119
  const response = await nodeRequest('GET', query, {
119
120
  username: getBrowserStackUser(this.#config),
120
121
  password: getBrowserStackKey(this.#config)
121
- }, 'https://api.browserstack.com');
122
+ }, APIUtils.BROWSERSTACK_PERCY_API_URL);
122
123
  PercyLogger.debug('Percy fetch token success : ' + response.token);
123
124
  if (!this.#options.percy && response.success) {
124
125
  this.percyAutoEnabled = response.success;
@@ -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 _capabilities;
@@ -22,9 +27,7 @@ declare class _AccessibilityHandler {
22
27
  private static _a11yScanSessionMap;
23
28
  private _sessionId;
24
29
  private listener;
25
- constructor(_browser: WebdriverIO.Browser | WebdriverIO.MultiRemoteBrowser, _capabilities: Capabilities.RemoteCapability, _options: BrowserstackConfig & BrowserstackOptions, isAppAutomate: boolean, _config: Options.Testrunner, _framework?: string | undefined, _accessibilityAutomation?: (boolean | string) | undefined, _turboscale?: boolean | string, _accessibilityOpts?: {
26
- [key: string]: any;
27
- } | undefined);
30
+ constructor(_browser: WebdriverIO.Browser | WebdriverIO.MultiRemoteBrowser, _capabilities: Capabilities.RemoteCapability, _options: BrowserstackConfig & BrowserstackOptions, isAppAutomate: boolean, _config: Options.Testrunner, _framework?: string | undefined, _accessibilityAutomation?: (boolean | string) | undefined, _turboscale?: boolean | string, _accessibilityOpts?: AccessibilityOptions | undefined);
28
31
  setSuiteFile(filename: string): void;
29
32
  _getCapabilityValue(caps: Capabilities.RemoteCapability, capType: string, legacyCapType: string): WebdriverIO.SafaridriverOptions | undefined;
30
33
  before(sessionId: string): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"accessibility-handler.d.ts","sourceRoot":"","sources":["../src/accessibility-handler.ts"],"names":[],"mappings":"AAEA,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;AA8BjE,cAAM,qBAAqB;IAiBnB,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,aAAa;IAErB,OAAO,CAAC,aAAa;IAErB,OAAO,CAAC,UAAU,CAAC;IACnB,OAAO,CAAC,wBAAwB,CAAC;IAEjC,OAAO,CAAC,kBAAkB,CAAC;IAxB/B,OAAO,CAAC,iBAAiB,CAAyB;IAClD,OAAO,CAAC,KAAK,CAA+B;IAC5C,OAAO,CAAC,UAAU,CAAC,CAAQ;IAC3B,OAAO,CAAC,cAAc,CAAC,CAAS;IAChC,OAAO,C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AAG,qBAAqB,CAAA;AAEjD,eAAe,oBAAoB,CAAA"}
@@ -1,3 +1,4 @@
1
+ /// <reference path="./@types/bstack-service-types.d.ts" />
1
2
  import util from 'node:util';
2
3
  import Listener from './testOps/listener.js';
3
4
  import { getA11yResultsSummary, getAppA11yResultsSummary, getA11yResults, performA11yScan, getUniqueIdentifier, getUniqueIdentifierForCucumber, isAccessibilityAutomationSession, isAppAccessibilityAutomationSession, isBrowserstackSession, o11yClassErrorHandler, shouldScanTestForAccessibility, validateCapsWithA11y, shouldAddServiceVersion, validateCapsWithNonBstackA11y, isTrue, validateCapsWithAppA11y, getAppA11yResults, isFalse } from './util.js';
@@ -107,19 +108,21 @@ class _AccessibilityHandler {
107
108
  this._accessibility = validateCapsWithAppA11y(this._platformA11yMeta);
108
109
  }
109
110
  }
110
- this._browser.getAccessibilityResultsSummary = async () => {
111
+ // Safely add accessibility methods to browser instance with proper typing
112
+ const browserWithA11y = this._browser;
113
+ browserWithA11y.getAccessibilityResultsSummary = async () => {
111
114
  if (isAppAccessibilityAutomationSession(this._accessibility, this.isAppAutomate)) {
112
115
  return await getAppA11yResultsSummary(this.isAppAutomate, this._browser, isBrowserstackSession(this._browser), this._accessibility, this._sessionId);
113
116
  }
114
117
  return await getA11yResultsSummary(this.isAppAutomate, this._browser, isBrowserstackSession(this._browser), this._accessibility);
115
118
  };
116
- this._browser.getAccessibilityResults = async () => {
119
+ browserWithA11y.getAccessibilityResults = async () => {
117
120
  if (isAppAccessibilityAutomationSession(this._accessibility, this.isAppAutomate)) {
118
121
  return await getAppA11yResults(this.isAppAutomate, this._browser, isBrowserstackSession(this._browser), this._accessibility, this._sessionId);
119
122
  }
120
123
  return await getA11yResults(this.isAppAutomate, this._browser, isBrowserstackSession(this._browser), this._accessibility);
121
124
  };
122
- this._browser.performScan = async () => {
125
+ browserWithA11y.performScan = async () => {
123
126
  const results = await performA11yScan(this.isAppAutomate, this._browser, isBrowserstackSession(this._browser), this._accessibility);
124
127
  if (results) {
125
128
  this._testMetadata[this._testIdentifier] = {
@@ -130,7 +133,7 @@ class _AccessibilityHandler {
130
133
  await this._setAnnotation('Accessibility scanning was triggered manually');
131
134
  return results;
132
135
  };
133
- this._browser.startA11yScanning = async () => {
136
+ browserWithA11y.startA11yScanning = async () => {
134
137
  AccessibilityHandler._a11yScanSessionMap[sessionId] = true;
135
138
  this._testMetadata[this._testIdentifier] = {
136
139
  scanTestForAccessibility: true,
@@ -138,7 +141,7 @@ class _AccessibilityHandler {
138
141
  };
139
142
  await this._setAnnotation('Accessibility scanning has started');
140
143
  };
141
- this._browser.stopA11yScanning = async () => {
144
+ browserWithA11y.stopA11yScanning = async () => {
142
145
  AccessibilityHandler._a11yScanSessionMap[sessionId] = false;
143
146
  await this._setAnnotation('Accessibility scanning has stopped');
144
147
  };
package/build/cleanup.js CHANGED
@@ -40,19 +40,19 @@ export default class BStackCleanup {
40
40
  if (!process.env[BROWSERSTACK_TESTHUB_JWT]) {
41
41
  return;
42
42
  }
43
- BStackLogger.debug('Executing observability cleanup');
43
+ BStackLogger.debug('Executing Test Reporting and Analytics cleanup');
44
44
  try {
45
45
  const killSignal = funnelData?.event_properties?.finishedMetadata?.signal;
46
46
  const result = await stopBuildUpstream(killSignal);
47
47
  if (process.env[BROWSERSTACK_OBSERVABILITY] && process.env[BROWSERSTACK_TESTHUB_UUID]) {
48
- BStackLogger.info(`\nVisit https://observability.browserstack.com/builds/${process.env[BROWSERSTACK_TESTHUB_UUID]} to view build report, insights, and many more debugging information all at one place!\n`);
48
+ BStackLogger.info(`\nVisit https://automation.browserstack.com/builds/${process.env[BROWSERSTACK_TESTHUB_UUID]} to view build report, insights, and many more debugging information all at one place!\n`);
49
49
  }
50
50
  const status = (result && result.status) || 'failed';
51
51
  const message = (result && result.message);
52
52
  this.updateO11yStopData(funnelData, status, status === 'failed' ? message : undefined);
53
53
  }
54
54
  catch (e) {
55
- BStackLogger.error('Error in stopping Observability build: ' + e);
55
+ BStackLogger.error('Error in stopping Test Reporting and Analytics build: ' + e);
56
56
  this.updateO11yStopData(funnelData, 'failed', e);
57
57
  }
58
58
  }
@@ -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,24 @@
1
+ export default class APIUtils {
2
+ static FUNNEL_INSTRUMENTATION_URL = 'https://api.browserstack.com/sdk/v1/event';
3
+ static BROWSERSTACK_AUTOMATE_API_URL = 'https://api.browserstack.com';
4
+ static BROWSERSTACK_AA_API_URL = 'https://api.browserstack.com';
5
+ static BROWSERSTACK_PERCY_API_URL = 'https://api.browserstack.com';
6
+ static BROWSERSTACK_AUTOMATE_API_CLOUD_URL = 'https://api-cloud.browserstack.com';
7
+ static BROWSERSTACK_AA_API_CLOUD_URL = 'https://api-cloud.browserstack.com';
8
+ static APP_ALLY_ENDPOINT = 'https://app-accessibility.browserstack.com/automate';
9
+ static DATA_ENDPOINT = 'https://collector-observability.browserstack.com';
10
+ static UPLOAD_LOGS_ADDRESS = 'https://upload-observability.browserstack.com';
11
+ static EDS_URL = 'https://eds.browserstack.com';
12
+ static updateURLSForGRR(apis) {
13
+ this.FUNNEL_INSTRUMENTATION_URL = `${apis.automate.api}/sdk/v1/event`;
14
+ this.BROWSERSTACK_AUTOMATE_API_URL = apis.automate.api;
15
+ this.BROWSERSTACK_AA_API_URL = apis.appAutomate.api;
16
+ this.BROWSERSTACK_PERCY_API_URL = apis.percy.api;
17
+ this.BROWSERSTACK_AUTOMATE_API_CLOUD_URL = apis.automate.upload;
18
+ this.BROWSERSTACK_AA_API_CLOUD_URL = apis.appAutomate.upload;
19
+ this.APP_ALLY_ENDPOINT = `${apis.appAccessibility.api}/automate`;
20
+ this.DATA_ENDPOINT = apis.observability.api;
21
+ this.UPLOAD_LOGS_ADDRESS = apis.observability.upload;
22
+ this.EDS_URL = apis.edsInstrumentation.api;
23
+ }
24
+ }
@@ -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,70 @@
1
+ import path from 'node:path';
2
+ import fs from 'node:fs';
3
+ import chalk from 'chalk';
4
+ import logger from '@wdio/logger';
5
+ import { LOGS_FILE } from '../constants.js';
6
+ import { COLORS } from '../util.js';
7
+ const log = logger('@wdio/browserstack-service/cli');
8
+ export class BStackLogger {
9
+ static logFilePath = path.join(process.cwd(), LOGS_FILE);
10
+ static logFolderPath = path.join(process.cwd(), 'logs');
11
+ static logFileStream;
12
+ static logToFile(logMessage, logLevel) {
13
+ try {
14
+ if (!this.logFileStream) {
15
+ this.ensureLogsFolder();
16
+ this.logFileStream = fs.createWriteStream(this.logFilePath, { flags: 'a' });
17
+ }
18
+ if (this.logFileStream && this.logFileStream.writable) {
19
+ this.logFileStream.write(this.formatLog(logMessage, logLevel));
20
+ }
21
+ }
22
+ catch (error) {
23
+ log.debug(`Failed to log to file. Error ${error}`);
24
+ }
25
+ }
26
+ static formatLog(logMessage, level) {
27
+ return `${chalk.gray(new Date().toISOString())} ${chalk[COLORS[level]](level.toUpperCase())} ${chalk.whiteBright('@wdio/browserstack-service')} ${logMessage}\n`;
28
+ }
29
+ static info(message) {
30
+ this.logToFile(message, 'info');
31
+ log.info(message);
32
+ }
33
+ static error(message) {
34
+ this.logToFile(message, 'error');
35
+ log.error(message);
36
+ }
37
+ static debug(message, param) {
38
+ this.logToFile(message, 'debug');
39
+ if (param) {
40
+ log.debug(message, param);
41
+ }
42
+ else {
43
+ log.debug(message);
44
+ }
45
+ }
46
+ static warn(message) {
47
+ this.logToFile(message, 'warn');
48
+ log.warn(message);
49
+ }
50
+ static trace(message) {
51
+ this.logToFile(message, 'trace');
52
+ log.trace(message);
53
+ }
54
+ static clearLogger() {
55
+ if (this.logFileStream) {
56
+ this.logFileStream.end();
57
+ }
58
+ this.logFileStream = null;
59
+ }
60
+ static clearLogFile() {
61
+ if (fs.existsSync(this.logFilePath)) {
62
+ fs.truncateSync(this.logFilePath);
63
+ }
64
+ }
65
+ static ensureLogsFolder() {
66
+ if (!fs.existsSync(this.logFolderPath)) {
67
+ fs.mkdirSync(this.logFolderPath);
68
+ }
69
+ }
70
+ }
@@ -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.RemoteCapabilities, options: BrowserstackConfig & BrowserstackOptions, buildTag?: string): string;
16
+ static getSdkVersion(): any;
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;AAiCxB,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,CA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