@wdio/browserstack-service 9.39.5 → 9.39.6
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/cleanup.js +2 -2
- package/build/cli/frameworks/testFramework.d.ts +13 -0
- package/build/cli/frameworks/wdioMochaTestFramework.d.ts +101 -0
- package/build/cli/skipReporter.d.ts +8 -1
- package/build/index.js +418 -195
- package/build/reporter.d.ts +8 -0
- package/build/service.d.ts +0 -36
- package/package.json +1 -1
package/build/reporter.d.ts
CHANGED
|
@@ -28,6 +28,14 @@ declare class _TestReporter extends WDIOReporter {
|
|
|
28
28
|
onSuiteStart(suiteStats: SuiteStats): void;
|
|
29
29
|
onSuiteEnd(): void;
|
|
30
30
|
needToSendData(testType?: string, event?: string): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* SDK-7843: mocha emits `fail` for a timed-out test while its body and wdio's `afterTest` are
|
|
33
|
+
* still pending, and with `bail` (or on the worker's last test) `after()` runs before that
|
|
34
|
+
* `afterTest`. On the CLI flow, send the test's finish now, with mocha's own result, so it is
|
|
35
|
+
* recorded before the session status is marked. The CLI framework reports each test once, so
|
|
36
|
+
* this is dropped for a normal failure, which afterTest has already reported.
|
|
37
|
+
*/
|
|
38
|
+
onTestFail(testStats: TestStats): Promise<void>;
|
|
31
39
|
onTestEnd(testStats: TestStats): Promise<void>;
|
|
32
40
|
onTestStart(testStats: TestStats): Promise<void>;
|
|
33
41
|
onHookStart(hookStats: HookStats): Promise<void>;
|
package/build/service.d.ts
CHANGED
|
@@ -21,20 +21,6 @@ export default class BrowserstackService implements Services.ServiceInstance {
|
|
|
21
21
|
private _specsRan;
|
|
22
22
|
private _observability;
|
|
23
23
|
private _currentTest?;
|
|
24
|
-
/**
|
|
25
|
-
* CLI/gRPC path: map of test identity -> the test_uuid minted for it at
|
|
26
|
-
* INIT_TEST/PRE. The CLI mints a fresh uuid into a SINGLE mutable per-worker tracked instance
|
|
27
|
-
* (`trackWdioMochaInstance` overwrites `TestFramework.instances[ctxId]` wholesale on every
|
|
28
|
-
* INIT_TEST), and the gRPC test-finish reads the uuid from that single slot. When a test hangs
|
|
29
|
-
* past the mocha timeout, the NEXT test's INIT_TEST overwrites the slot before the hung test's
|
|
30
|
-
* afterTest POST fires, so the POST would carry the wrong (next) test's uuid and the binary
|
|
31
|
-
* would close the wrong test_run — orphaning the hung one. We snapshot each test's uuid here,
|
|
32
|
-
* keyed by the same identity the legacy `_tests` map uses, and at afterTest we restore the
|
|
33
|
-
* finishing test's minted uuid onto the tracked instance before the POST so it closes the
|
|
34
|
-
* correct test_run. The finishing identity is `originalTest` (already snapshotted pre-await by
|
|
35
|
-
* the testFnWrapper, so it is the timed-out runnable's own identity, not the next test's).
|
|
36
|
-
*/
|
|
37
|
-
private _cliTestUuids;
|
|
38
24
|
private _insightsHandler?;
|
|
39
25
|
private _accessibility;
|
|
40
26
|
private _accessibilityHandler?;
|
|
@@ -78,28 +64,6 @@ export default class BrowserstackService implements Services.ServiceInstance {
|
|
|
78
64
|
private _reportCucumberScenariosSkipped;
|
|
79
65
|
beforeTest(test: Frameworks.Test): Promise<void>;
|
|
80
66
|
afterTest(originalTest: Frameworks.Test, context: never, results: Frameworks.TestResult): Promise<void>;
|
|
81
|
-
/**
|
|
82
|
-
* Whether this failure will be retried, in which case mocha has not dropped anything yet and
|
|
83
|
-
* the tests after it are still going to run.
|
|
84
|
-
*
|
|
85
|
-
* `results.retries` only tracks wdio's spec-file retries — `@wdio/utils` builds it as
|
|
86
|
-
* `{ attempts: 0, limit: repeatTest }` and `@wdio/mocha-framework` never feeds `mochaOpts.retries`
|
|
87
|
-
* into it, so under mocha-level retries it stays `{0, 0}` and tells us nothing. Read mocha's own
|
|
88
|
-
* runnable state for that case, otherwise the cascade fires on the first attempt and reports
|
|
89
|
-
* tests as skipped that the retry then actually runs.
|
|
90
|
-
*/
|
|
91
|
-
private hasRetryPending;
|
|
92
|
-
/**
|
|
93
|
-
* mocha's `bail` aborts the run on the first failure, so every test the spec had not reached
|
|
94
|
-
* yet is dropped without emitting any event and never appears on the dashboard. Report them
|
|
95
|
-
* as skipped — same cascade the failed-hook path uses, from the spec's root suite so sibling
|
|
96
|
-
* describes are covered too (bail kills the whole spec, not just the failing describe).
|
|
97
|
-
*
|
|
98
|
-
* The root can span more than one file when specs are grouped — `MochaAdapter` adds every spec
|
|
99
|
-
* it is handed to one mocha instance. Cascading across them is still correct: bail aborts that
|
|
100
|
-
* whole runner, so those tests do not run either.
|
|
101
|
-
*/
|
|
102
|
-
private reportBailSkippedTests;
|
|
103
67
|
after(result: number): Promise<void>;
|
|
104
68
|
/**
|
|
105
69
|
* For CucumberJS
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/browserstack-service",
|
|
3
|
-
"version": "9.39.
|
|
3
|
+
"version": "9.39.6",
|
|
4
4
|
"description": "WebdriverIO service for better Browserstack integration",
|
|
5
5
|
"author": "BrowserStack <support@browserstack.com>",
|
|
6
6
|
"homepage": "https://github.com/browserstack/wdio-browserstack-service",
|