@wdio/browserstack-service 9.34.1 → 9.35.1

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 CHANGED
@@ -76,6 +76,14 @@ export const config = {
76
76
 
77
77
  You can explore all the features of Test Reporting and Analytics in [this sandbox](https://automation.browserstack.com/) or read more about it [here](https://www.browserstack.com/docs/test-reporting-and-analytics/overview/what-is-test-observability).
78
78
 
79
+ #### Reporting of tests skipped by `bail`
80
+
81
+ With `mochaOpts: { bail: true }`, Mocha halts a spec on its first failure and the remaining tests in that file never run. Those tests are now reported with the status `skipped`, so the report accounts for every test in the spec rather than silently omitting them. Tests in sibling `describe` blocks in the same file are covered too.
82
+
83
+ Requires `mocha` as the framework and Test Reporting enabled.
84
+
85
+ Note that WebdriverIO's own top-level `bail` option is a different setting: it counts failed *spec files* and stops scheduling further ones, rather than stopping tests within a spec. Tests in spec files that never start are not currently reported.
86
+
79
87
  ### browserstackLocal
80
88
  Set this to true to enable routing connections from BrowserStack cloud through your computer.
81
89
 
@@ -34,6 +34,12 @@ declare class _AccessibilityHandler {
34
34
  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);
35
35
  setSuiteFile(filename: string): void;
36
36
  _getCapabilityValue(caps: Capabilities.ResolvedTestrunnerCapabilities, capType: string, legacyCapType: string): unknown;
37
+ /**
38
+ * A reload replaces the session id under a driver object that otherwise carries on
39
+ * unchanged. `_sessionId` is captured once in `before()`, so without this every later
40
+ * scan-gate lookup and every results call keeps addressing the session that already ended.
41
+ */
42
+ onSessionReload(oldSessionId: string, newSessionId: string): void;
37
43
  before(sessionId: string): Promise<void>;
38
44
  beforeTest(suiteTitle: string | undefined, test: Frameworks.Test): Promise<void>;
39
45
  afterTest(suiteTitle: string | undefined, test: Frameworks.Test): Promise<void>;