@wdio/browserstack-service 8.52.0 → 8.53.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/README.md +32 -0
- package/build/Percy/PercySDK.d.ts +3 -3
- package/build/Percy/PercySDK.d.ts.map +1 -1
- package/build/Percy/PercySDK.js +54 -13
- package/build/Percy/PercySDK.js.map +1 -1
- package/build/cli/cliUtils.d.ts.map +1 -1
- package/build/cli/cliUtils.js +1 -1
- package/build/cli/cliUtils.js.map +1 -1
- package/build/cli/eventDispatcher.d.ts.map +1 -1
- package/build/cli/eventDispatcher.js +11 -1
- package/build/cli/eventDispatcher.js.map +1 -1
- package/build/cli/frameworks/constants/testFrameworkConstants.d.ts +1 -0
- package/build/cli/frameworks/constants/testFrameworkConstants.d.ts.map +1 -1
- package/build/cli/frameworks/constants/testFrameworkConstants.js +1 -0
- package/build/cli/frameworks/constants/testFrameworkConstants.js.map +1 -1
- package/build/cli/frameworks/wdioCucumberTestFramework.d.ts +153 -0
- package/build/cli/frameworks/wdioCucumberTestFramework.d.ts.map +1 -0
- package/build/cli/frameworks/wdioCucumberTestFramework.js +574 -0
- package/build/cli/frameworks/wdioCucumberTestFramework.js.map +1 -0
- package/build/cli/index.d.ts +3 -3
- package/build/cli/index.d.ts.map +1 -1
- package/build/cli/index.js +11 -3
- package/build/cli/index.js.map +1 -1
- package/build/cli/modules/accessibilityModule.d.ts.map +1 -1
- package/build/cli/modules/accessibilityModule.js +5 -1
- package/build/cli/modules/accessibilityModule.js.map +1 -1
- package/build/cli/modules/automateModule.d.ts +17 -1
- package/build/cli/modules/automateModule.d.ts.map +1 -1
- package/build/cli/modules/automateModule.js +159 -12
- package/build/cli/modules/automateModule.js.map +1 -1
- package/build/cli/modules/testHubModule.d.ts +7 -1
- package/build/cli/modules/testHubModule.d.ts.map +1 -1
- package/build/cli/modules/testHubModule.js +14 -3
- package/build/cli/modules/testHubModule.js.map +1 -1
- package/build/constants.d.ts.map +1 -1
- package/build/constants.js +1 -1
- package/build/constants.js.map +1 -1
- package/build/insights-handler.d.ts +1 -1
- package/build/insights-handler.d.ts.map +1 -1
- package/build/insights-handler.js +7 -6
- package/build/insights-handler.js.map +1 -1
- package/build/service.d.ts +34 -0
- package/build/service.d.ts.map +1 -1
- package/build/service.js +214 -7
- package/build/service.js.map +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,574 @@
|
|
|
1
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import TestFramework from './testFramework.js';
|
|
4
|
+
import { TestFrameworkState } from '../states/testFrameworkState.js';
|
|
5
|
+
import { HookState } from '../states/hookState.js';
|
|
6
|
+
import TestFrameworkInstance from '../instances/testFrameworkInstance.js';
|
|
7
|
+
import TrackedInstance from '../instances/trackedInstance.js';
|
|
8
|
+
import { CLIUtils } from '../cliUtils.js';
|
|
9
|
+
import { TestFrameworkConstants } from './constants/testFrameworkConstants.js';
|
|
10
|
+
import { BStackLogger as logger } from '../cliLogger.js';
|
|
11
|
+
import { TEST_ANALYTICS_ID } from '../../constants.js';
|
|
12
|
+
import { getScenarioExamples, removeAnsiColors } from '../../util.js';
|
|
13
|
+
/**
|
|
14
|
+
* Wire keys the binary's WebdriverIO-cucumber module consumes that have no entry in
|
|
15
|
+
* TestFrameworkConstants. Kept local rather than appended to that file, which mocha shares.
|
|
16
|
+
*/
|
|
17
|
+
const KEY_TEST_DURATION = 'test_duration';
|
|
18
|
+
const KEY_BDD_META_INFO = 'bdd_meta_info';
|
|
19
|
+
const KEY_TEST_SKIPPED_CASCADE = 'test_skipped_cascade';
|
|
20
|
+
const KEY_HOOK_SCOPE = 'hook_scope';
|
|
21
|
+
const KEY_HOOK_RETRIES = 'hook_retries';
|
|
22
|
+
const KEY_HOOK_DURATION = 'hook_duration';
|
|
23
|
+
const HOOK_STATES = {
|
|
24
|
+
BEFORE_ALL: TestFrameworkState.BEFORE_ALL,
|
|
25
|
+
AFTER_ALL: TestFrameworkState.AFTER_ALL,
|
|
26
|
+
BEFORE_EACH: TestFrameworkState.BEFORE_EACH,
|
|
27
|
+
AFTER_EACH: TestFrameworkState.AFTER_EACH,
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* CLI test framework for `framework: 'cucumber'` under WebdriverIO.
|
|
31
|
+
*
|
|
32
|
+
* Extends the BASE TestFramework, never WdioMochaTestFramework: WDIO does not call
|
|
33
|
+
* `beforeTest`/`afterTest` or deliver titled hooks for cucumber, so mocha's INIT_TEST / TEST /
|
|
34
|
+
* hook-boundary semantics have no source here.
|
|
35
|
+
*
|
|
36
|
+
* A scenario raises TEST/PRE at `beforeScenario` and TEST/POST at `afterScenario`. That is not a
|
|
37
|
+
* preference: the binary's WDIO language index dispatches only on `TEST` and `^(BEFORE_|AFTER_)`,
|
|
38
|
+
* so an additional state would be silently discarded on the far side.
|
|
39
|
+
*/
|
|
40
|
+
export default class WdioCucumberTestFramework extends TestFramework {
|
|
41
|
+
static KEY_HOOK_LAST_STARTED = 'test_hook_last_started';
|
|
42
|
+
static KEY_HOOK_LAST_FINISHED = 'test_hook_last_finished';
|
|
43
|
+
/**
|
|
44
|
+
* The bookkeeping hook classification is derived from. A cucumber hook invocation carries no
|
|
45
|
+
* title and `BeforeAll`/`AfterAll` pass no hook object at all, so `util.ts → getHookType()`
|
|
46
|
+
* (Mocha quoted-title matching) can only return 'unknown' or throw on the property access.
|
|
47
|
+
*
|
|
48
|
+
* `stepDepth` is deliberately NOT reset per scenario. Legacy pushes to and pops from
|
|
49
|
+
* `_cucumberData.steps` with no per-scenario reset, so a step that never reaches `afterStep`
|
|
50
|
+
* leaves the depth above zero for the rest of the run and every later AFTER_EACH is
|
|
51
|
+
* classified null and dropped. That is v8 behaviour and therefore the parity target
|
|
52
|
+
* (pre-existing-bugs PB-V8-1); the per-scenario reset exists only on the v9 line.
|
|
53
|
+
*/
|
|
54
|
+
cucumberData = { scenariosStarted: false, stepsStarted: false, stepDepth: 0 };
|
|
55
|
+
/**
|
|
56
|
+
* Steps of the scenario in flight, mirroring legacy's per-scenario `_tests[uniqueId].steps`.
|
|
57
|
+
* Re-allocated (never cleared in place) at each scenario start, so a payload already built
|
|
58
|
+
* from the previous scenario cannot observe this one's steps through a retained reference.
|
|
59
|
+
*/
|
|
60
|
+
scenarioSteps = [];
|
|
61
|
+
/** The hook started and not yet finished on this worker — legacy's `_currentHook`. */
|
|
62
|
+
openHook = null;
|
|
63
|
+
/**
|
|
64
|
+
* Set when a hook finish arrived with no recorded start. Legacy throws at that point and the
|
|
65
|
+
* wrapper swallows it, which drops the HookRunFinished *and* the BEFORE_ALL cascade in the
|
|
66
|
+
* same call; this flag reproduces the second half.
|
|
67
|
+
*/
|
|
68
|
+
lastHookFinishOrphaned = false;
|
|
69
|
+
constructor(testFrameworks, testFrameworkVersions, binSessionId) {
|
|
70
|
+
super(testFrameworks, testFrameworkVersions, binSessionId);
|
|
71
|
+
logger.debug('WdioCucumberTestFramework: constructed');
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Feature bookkeeping. Raises no state — cucumber has no feature-level wire event, and
|
|
75
|
+
* `beforeSuite`/`afterSuite` are not part of its WDIO surface.
|
|
76
|
+
*/
|
|
77
|
+
onFeatureStart(uri, feature) {
|
|
78
|
+
logger.debug(`WdioCucumberTestFramework.onFeatureStart: uri=${uri} feature=${feature?.name}`);
|
|
79
|
+
this.cucumberData.scenariosStarted = false;
|
|
80
|
+
this.cucumberData.feature = feature;
|
|
81
|
+
this.cucumberData.uri = uri;
|
|
82
|
+
}
|
|
83
|
+
/** Step bookkeeping. Steps travel inside the scenario payload's BDD meta, never as events. */
|
|
84
|
+
onStepStart(step) {
|
|
85
|
+
this.cucumberData.stepsStarted = true;
|
|
86
|
+
this.cucumberData.stepDepth++;
|
|
87
|
+
this.scenarioSteps.push({
|
|
88
|
+
id: step.id,
|
|
89
|
+
text: step.text,
|
|
90
|
+
keyword: step.keyword,
|
|
91
|
+
started_at: (new Date()).toISOString(),
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
onStepEnd(step, result) {
|
|
95
|
+
// Math.max mirrors Array.pop() on an empty array, which legacy relies on.
|
|
96
|
+
this.cucumberData.stepDepth = Math.max(0, this.cucumberData.stepDepth - 1);
|
|
97
|
+
const stepMeta = this.scenarioSteps.find(item => item.id === step.id);
|
|
98
|
+
if (!stepMeta) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
stepMeta.finished_at = (new Date()).toISOString();
|
|
102
|
+
stepMeta.result = result.passed ? 'PASSED' : 'FAILED';
|
|
103
|
+
stepMeta.duration = result.duration;
|
|
104
|
+
if (result.error) {
|
|
105
|
+
stepMeta.failure = removeAnsiColors(result.error);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Classify a cucumber hook invocation from the bookkeeping state — legacy's
|
|
110
|
+
* `getCucumberHookType()` algorithm.
|
|
111
|
+
*
|
|
112
|
+
* Returns null for a step-scoped hook (`BeforeStep`/`AfterStep`), which is never reported;
|
|
113
|
+
* reporting one would change the dashboard hook count.
|
|
114
|
+
*/
|
|
115
|
+
classifyHookType(test) {
|
|
116
|
+
if (!test) {
|
|
117
|
+
return this.cucumberData.scenariosStarted ? 'AFTER_ALL' : 'BEFORE_ALL';
|
|
118
|
+
}
|
|
119
|
+
if (!this.cucumberData.stepsStarted) {
|
|
120
|
+
return 'BEFORE_EACH';
|
|
121
|
+
}
|
|
122
|
+
if (this.cucumberData.stepDepth > 0) {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
return 'AFTER_EACH';
|
|
126
|
+
}
|
|
127
|
+
/** The TestFrameworkState a cucumber hook maps to, or null when it is never reported. */
|
|
128
|
+
classifyHookState(test) {
|
|
129
|
+
const hookType = this.classifyHookType(test);
|
|
130
|
+
return hookType ? HOOK_STATES[hookType] : null;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Whether a failed BEFORE_ALL should run the skip cascade. False when the finish that just
|
|
134
|
+
* arrived had no recorded start — see `lastHookFinishOrphaned`.
|
|
135
|
+
*/
|
|
136
|
+
shouldCascadeSkippedScenarios() {
|
|
137
|
+
return !this.lastHookFinishOrphaned;
|
|
138
|
+
}
|
|
139
|
+
/** `<HOOK_TYPE> for <scenario|feature name>`; the separator is a literal ' for '. */
|
|
140
|
+
hookName(hookType) {
|
|
141
|
+
switch (hookType) {
|
|
142
|
+
case 'BEFORE_EACH':
|
|
143
|
+
case 'AFTER_EACH':
|
|
144
|
+
return `${hookType} for ${this.cucumberData.scenario?.name}`;
|
|
145
|
+
case 'BEFORE_ALL':
|
|
146
|
+
case 'AFTER_ALL':
|
|
147
|
+
return `${hookType} for ${this.cucumberData.feature?.name}`;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* The ABSOLUTE feature path. `beforeFeature`'s uri is already absolute; path.resolve only
|
|
152
|
+
* normalises it. The binary re-bases this itself — `path.relative(session.pathProject, …)`
|
|
153
|
+
* for file_name/location and against the git root for vc_filepath — so sending a
|
|
154
|
+
* pre-relativised value makes both fields depend on the binary's own cwd (SDK-7233).
|
|
155
|
+
*/
|
|
156
|
+
featurePath() {
|
|
157
|
+
const uri = this.cucumberData.uri;
|
|
158
|
+
return uri ? path.resolve(process.cwd(), uri) : undefined;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* The feature path as the bdd meta blob wants it — cwd-relative, matching legacy.
|
|
162
|
+
*
|
|
163
|
+
* Not `featurePath()`: the binary re-bases `test_file_path`/`location` itself but never touches
|
|
164
|
+
* this blob, so an absolute value reaches the dashboard verbatim, home directory and all.
|
|
165
|
+
* Legacy reads the world's `gherkinDocument.uri`, which is already cwd-relative.
|
|
166
|
+
*/
|
|
167
|
+
featureUriForMeta() {
|
|
168
|
+
const absolute = this.featurePath();
|
|
169
|
+
return absolute ? path.relative(process.cwd(), absolute) : undefined;
|
|
170
|
+
}
|
|
171
|
+
featureFilePathEntries() {
|
|
172
|
+
const featurePath = this.featurePath();
|
|
173
|
+
return {
|
|
174
|
+
[TestFrameworkConstants.KEY_TEST_FILE_PATH]: featurePath,
|
|
175
|
+
[TestFrameworkConstants.KEY_TEST_LOCATION]: featurePath,
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
async trackEvent(testFrameworkState, hookState, args = {}) {
|
|
179
|
+
logger.debug(`WdioCucumberTestFramework.trackEvent: testFrameworkState=${testFrameworkState} hookState=${hookState}`);
|
|
180
|
+
await super.trackEvent(testFrameworkState, hookState, args);
|
|
181
|
+
const instance = this.resolveInstance(testFrameworkState, hookState);
|
|
182
|
+
if (!instance) {
|
|
183
|
+
// Console output before the first scenario has nothing to attach to; legacy drops it
|
|
184
|
+
// just as silently (appendTestItemLog needs a test or hook uuid and has neither).
|
|
185
|
+
const detail = `trackEvent: no instance for testFrameworkState=${testFrameworkState} hookState=${hookState}`;
|
|
186
|
+
if (testFrameworkState === TestFrameworkState.LOG) {
|
|
187
|
+
logger.debug(detail);
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
logger.error(detail);
|
|
191
|
+
}
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
const shortState = testFrameworkState.toString().split('.')[1];
|
|
195
|
+
const isHook = CLIUtils.matchHookRegex(shortState);
|
|
196
|
+
try {
|
|
197
|
+
if (isHook && hookState === HookState.PRE) {
|
|
198
|
+
instance.updateMultipleEntries({
|
|
199
|
+
[TestFrameworkConstants.KEY_HOOK_ID]: uuidv4(),
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
if (testFrameworkState === TestFrameworkState.TEST) {
|
|
203
|
+
if (hookState === HookState.PRE) {
|
|
204
|
+
this.loadScenarioData(instance, args.world);
|
|
205
|
+
instance.updateMultipleEntries({
|
|
206
|
+
[TestFrameworkConstants.KEY_TEST_STARTED_AT]: new Date().toISOString(),
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
else if (hookState === HookState.POST) {
|
|
210
|
+
instance.updateMultipleEntries({
|
|
211
|
+
[TestFrameworkConstants.KEY_TEST_ENDED_AT]: new Date().toISOString(),
|
|
212
|
+
});
|
|
213
|
+
this.loadScenarioResult(instance, args);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
else if (testFrameworkState === TestFrameworkState.LOG) {
|
|
217
|
+
this.loadLogEntry(instance, args.logEntry);
|
|
218
|
+
}
|
|
219
|
+
if (isHook && !this.trackHookEvents(instance, shortState, hookState, args)) {
|
|
220
|
+
// Orphaned hook finish: legacy emits nothing for it at all.
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
catch (error) {
|
|
225
|
+
logger.error(`trackEvent: Error in tracking events: ${error} hookState=${hookState} testFrameworkState=${testFrameworkState}`);
|
|
226
|
+
}
|
|
227
|
+
args.instance = instance;
|
|
228
|
+
await this.runHooks(instance, testFrameworkState, hookState, args);
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* One instance per scenario. `TestFramework.instances` is keyed on
|
|
232
|
+
* `sha256(CLIUtils.getCurrentInstanceName())` = `sha256('<pid>:<threadId>')`, and every
|
|
233
|
+
* `cli/modules/*` reads it through the single `TestFramework.getTrackedInstance()` lookup, so
|
|
234
|
+
* that key is the only one to register under.
|
|
235
|
+
*
|
|
236
|
+
* WDIO forks a worker process per spec and registers its own `beforeScenario`/`afterScenario`
|
|
237
|
+
* as cucumber Before/After hooks that cucumber awaits sequentially, so the previous scenario
|
|
238
|
+
* has always finished before the next one mints its instance — the slot cannot be clobbered
|
|
239
|
+
* mid-scenario the way mocha's two instance-creation triggers can.
|
|
240
|
+
*/
|
|
241
|
+
resolveInstance(testFrameworkState, hookState) {
|
|
242
|
+
let instance = TestFramework.getTrackedInstance();
|
|
243
|
+
const isHook = CLIUtils.matchHookRegex(testFrameworkState.toString().split('.')[1]);
|
|
244
|
+
if (testFrameworkState === TestFrameworkState.TEST && hookState === HookState.PRE) {
|
|
245
|
+
this.trackWdioCucumberInstance(testFrameworkState);
|
|
246
|
+
}
|
|
247
|
+
else if (isHook && hookState === HookState.PRE && !instance) {
|
|
248
|
+
// BEFORE_ALL runs before any scenario exists. Every other hook reuses the live
|
|
249
|
+
// instance: WDIO's beforeScenario is registered before the user's Before hooks and
|
|
250
|
+
// its afterScenario runs after their After hooks, so an EACH hook always lands on
|
|
251
|
+
// its own scenario's instance and an ALL hook on the last scenario's — which is the
|
|
252
|
+
// uuid legacy stamps as test_run_id.
|
|
253
|
+
this.trackWdioCucumberInstance(testFrameworkState);
|
|
254
|
+
}
|
|
255
|
+
instance = TestFramework.getTrackedInstance();
|
|
256
|
+
if (!instance) {
|
|
257
|
+
logger.debug(`resolveInstance: no instance for testFrameworkState=${testFrameworkState} hookState=${hookState}`);
|
|
258
|
+
return null;
|
|
259
|
+
}
|
|
260
|
+
this.updateInstanceState(instance, testFrameworkState, hookState);
|
|
261
|
+
return instance;
|
|
262
|
+
}
|
|
263
|
+
trackWdioCucumberInstance(testFrameworkState) {
|
|
264
|
+
const target = CLIUtils.getCurrentInstanceName();
|
|
265
|
+
const trackedContext = TrackedInstance.createContext(target);
|
|
266
|
+
const instance = new TestFrameworkInstance(trackedContext, this.getTestFrameworks(), this.getTestFrameworksVersions(), testFrameworkState, HookState.NONE);
|
|
267
|
+
const frameworkName = this.getTestFrameworks()[0];
|
|
268
|
+
const testUuid = uuidv4();
|
|
269
|
+
instance.updateMultipleEntries({
|
|
270
|
+
[TestFrameworkConstants.KEY_TEST_FRAMEWORK_NAME]: frameworkName,
|
|
271
|
+
[TestFrameworkConstants.KEY_TEST_FRAMEWORK_VERSION]: this.getTestFrameworksVersions()[frameworkName],
|
|
272
|
+
[TestFrameworkConstants.KEY_TEST_LOGS]: [],
|
|
273
|
+
[TestFrameworkConstants.KEY_HOOKS_FINISHED]: new Map(),
|
|
274
|
+
[TestFrameworkConstants.KEY_HOOKS_STARTED]: new Map(),
|
|
275
|
+
[TestFrameworkConstants.KEY_TEST_UUID]: testUuid,
|
|
276
|
+
[TestFrameworkConstants.KEY_TEST_RESULT]: TestFrameworkConstants.DEFAULT_TEST_RESULT,
|
|
277
|
+
});
|
|
278
|
+
// Read by the Web-A11y and App-A11y scan paths to stamp the scan with this test run.
|
|
279
|
+
process.env[TEST_ANALYTICS_ID] = testUuid;
|
|
280
|
+
TestFramework.setTrackedInstance(trackedContext, instance);
|
|
281
|
+
logger.debug(`trackWdioCucumberInstance: contextId=${trackedContext.getId()} target=${target} testUuid=${testUuid}`);
|
|
282
|
+
}
|
|
283
|
+
/** Scenario identity. The asymmetries between the fields are deliberate. */
|
|
284
|
+
loadScenarioData(instance, world) {
|
|
285
|
+
if (!world?.pickle) {
|
|
286
|
+
logger.error('loadScenarioData: no pickle on the world object; scenario identity will be empty');
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
const pickle = world.pickle;
|
|
290
|
+
const feature = world.gherkinDocument?.feature;
|
|
291
|
+
this.cucumberData.scenario = pickle;
|
|
292
|
+
this.cucumberData.scenariosStarted = true;
|
|
293
|
+
this.cucumberData.stepsStarted = false;
|
|
294
|
+
// stepDepth is NOT reset here — see the cucumberData doc comment (PB-V8-1).
|
|
295
|
+
this.scenarioSteps = [];
|
|
296
|
+
const examples = getScenarioExamples(world);
|
|
297
|
+
// One space before '(' and ', ' between cells, no trailing space.
|
|
298
|
+
const qualifiedName = examples
|
|
299
|
+
? pickle.name + ' (' + examples.join(', ') + ')'
|
|
300
|
+
: pickle.name;
|
|
301
|
+
instance.updateMultipleEntries({
|
|
302
|
+
// The RAW pickle name, deliberately without the examples qualifier that name/scope
|
|
303
|
+
// carry: the binary maps this to `identifier`, and collapsing the two would fold
|
|
304
|
+
// every row of a Scenario Outline into one dashboard test.
|
|
305
|
+
[TestFrameworkConstants.KEY_TEST_ID]: pickle.name,
|
|
306
|
+
[TestFrameworkConstants.KEY_TEST_NAME]: qualifiedName,
|
|
307
|
+
[TestFrameworkConstants.KEY_TEST_SCOPE]: qualifiedName,
|
|
308
|
+
[TestFrameworkConstants.KEY_TEST_SCOPES]: [feature?.name || ''],
|
|
309
|
+
// Step source is never reported for cucumber, unlike the mocha path's test.body.
|
|
310
|
+
[TestFrameworkConstants.KEY_TEST_CODE]: null,
|
|
311
|
+
// Gherkin tag text INCLUDING the leading '@', source order, no dedupe, no casing
|
|
312
|
+
// change. `.map` allocates a new array; the pickle's own collection is never mutated.
|
|
313
|
+
[TestFrameworkConstants.KEY_TEST_TAGS]: pickle.tags.map(({ name }) => name),
|
|
314
|
+
...this.featureFilePathEntries(),
|
|
315
|
+
[KEY_BDD_META_INFO]: this.buildBddMetaInfo(pickle, feature, examples),
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
buildBddMetaInfo(pickle, feature, examples) {
|
|
319
|
+
return {
|
|
320
|
+
feature: {
|
|
321
|
+
name: feature?.name,
|
|
322
|
+
path: this.featureUriForMeta(),
|
|
323
|
+
description: feature?.description,
|
|
324
|
+
},
|
|
325
|
+
scenario: { name: pickle.name },
|
|
326
|
+
steps: this.scenarioSteps.map(step => ({ ...step })),
|
|
327
|
+
examples: examples ?? [],
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Scenario result.
|
|
332
|
+
*
|
|
333
|
+
* KEY_TEST_RESULT_AT is set even though `testHubModule.onAllTestEvents()` cannot actually
|
|
334
|
+
* defer a completion on this line — its `sendTestFrameworkEvent()` call sits outside the
|
|
335
|
+
* else-if chain and runs regardless. Setting it keeps `test_deferred` off the wire and the
|
|
336
|
+
* "dropping due to lack of results" line out of the log.
|
|
337
|
+
*/
|
|
338
|
+
loadScenarioResult(instance, args) {
|
|
339
|
+
const world = args.world;
|
|
340
|
+
const pickle = world?.pickle ?? this.cucumberData.scenario;
|
|
341
|
+
const feature = world?.gherkinDocument?.feature ?? this.cucumberData.feature;
|
|
342
|
+
const updates = {
|
|
343
|
+
[TestFrameworkConstants.KEY_TEST_RESULT_AT]: new Date().toISOString(),
|
|
344
|
+
};
|
|
345
|
+
if (pickle) {
|
|
346
|
+
updates[KEY_BDD_META_INFO] = this.buildBddMetaInfo(pickle, feature, getScenarioExamples(world));
|
|
347
|
+
}
|
|
348
|
+
const result = world?.result;
|
|
349
|
+
if (result) {
|
|
350
|
+
let testResult = result.status.toLowerCase();
|
|
351
|
+
if (testResult !== 'passed' && testResult !== 'failed') {
|
|
352
|
+
// UNKNOWN / UNDEFINED / AMBIGUOUS / PENDING / SKIPPED all collapse to skipped.
|
|
353
|
+
testResult = 'skipped';
|
|
354
|
+
}
|
|
355
|
+
// A scenario that failed only in a hook reports passed to Observability when the user
|
|
356
|
+
// declared ignoreHooksStatus. `hasStepFailures` is read from the same step store
|
|
357
|
+
// service.afterScenario() consults, so the o11y result and the session status cannot
|
|
358
|
+
// disagree; absent that store, legacy treats the failure as a step failure.
|
|
359
|
+
const hasStepFailures = args.hasStepFailures === undefined ? true : args.hasStepFailures === true;
|
|
360
|
+
if (args.ignoreHooksStatus === true && testResult === 'failed' && !hasStepFailures) {
|
|
361
|
+
testResult = 'passed';
|
|
362
|
+
}
|
|
363
|
+
updates[TestFrameworkConstants.KEY_TEST_RESULT] = testResult;
|
|
364
|
+
// Cucumber's own protobuf Duration, never an ended_at - started_at delta.
|
|
365
|
+
updates[KEY_TEST_DURATION] = result.duration
|
|
366
|
+
? result.duration.seconds * 1000 + result.duration.nanos / 1000000
|
|
367
|
+
: undefined;
|
|
368
|
+
if (testResult === 'failed') {
|
|
369
|
+
const message = result.message;
|
|
370
|
+
// A ONE-element backtrace; the mocha path sends message + stack.
|
|
371
|
+
updates[TestFrameworkConstants.KEY_TEST_FAILURE] = [
|
|
372
|
+
{ backtrace: [message ? removeAnsiColors(message) : 'unknown'] }
|
|
373
|
+
];
|
|
374
|
+
updates[TestFrameworkConstants.KEY_TEST_FAILURE_REASON] = message ? removeAnsiColors(message) : message;
|
|
375
|
+
if (message) {
|
|
376
|
+
updates[TestFrameworkConstants.KEY_TEST_FAILURE_TYPE] = message.match(/AssertionError/)
|
|
377
|
+
? 'AssertionError'
|
|
378
|
+
: 'UnhandledError';
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
instance.updateMultipleEntries(updates);
|
|
383
|
+
this.cucumberData.scenario = undefined;
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* One detached instance per scenario the feature never reached, for the BEFORE_ALL cascade
|
|
387
|
+
* (Rule-nested scenarios included).
|
|
388
|
+
*
|
|
389
|
+
* Detached is load-bearing: these are not registered via `setTrackedInstance`, so neither the
|
|
390
|
+
* live instance nor `process.env[TEST_ANALYTICS_ID]` is disturbed, and the caller sends them
|
|
391
|
+
* straight to TestHub. Routing them through the observers would rename the Automate session,
|
|
392
|
+
* stop the accessibility scan and run a Percy teardown per row, none of which legacy does.
|
|
393
|
+
*/
|
|
394
|
+
buildSkippedScenarioInstances() {
|
|
395
|
+
const feature = this.cucumberData.feature;
|
|
396
|
+
if (!feature) {
|
|
397
|
+
logger.debug('buildSkippedScenarioInstances: no feature recorded; nothing to cascade');
|
|
398
|
+
return [];
|
|
399
|
+
}
|
|
400
|
+
const scenarios = [];
|
|
401
|
+
for (const child of (feature.children || [])) {
|
|
402
|
+
if (child.rule) {
|
|
403
|
+
for (const ruleChild of (child.rule.children || [])) {
|
|
404
|
+
if (ruleChild.scenario) {
|
|
405
|
+
scenarios.push(ruleChild.scenario);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
else if (child.scenario) {
|
|
410
|
+
scenarios.push(child.scenario);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
return scenarios.map(scenario => this.buildSkippedScenarioInstance(scenario, feature));
|
|
414
|
+
}
|
|
415
|
+
buildSkippedScenarioInstance(scenario, feature) {
|
|
416
|
+
const now = new Date().toISOString();
|
|
417
|
+
const instance = new TestFrameworkInstance(TrackedInstance.createContext(CLIUtils.getCurrentInstanceName()), this.getTestFrameworks(), this.getTestFrameworksVersions(), TestFrameworkState.TEST, HookState.POST);
|
|
418
|
+
const frameworkName = this.getTestFrameworks()[0];
|
|
419
|
+
instance.updateMultipleEntries({
|
|
420
|
+
[TestFrameworkConstants.KEY_TEST_FRAMEWORK_NAME]: frameworkName,
|
|
421
|
+
[TestFrameworkConstants.KEY_TEST_FRAMEWORK_VERSION]: this.getTestFrameworksVersions()[frameworkName],
|
|
422
|
+
[TestFrameworkConstants.KEY_TEST_LOGS]: [],
|
|
423
|
+
[TestFrameworkConstants.KEY_HOOKS_STARTED]: new Map(),
|
|
424
|
+
[TestFrameworkConstants.KEY_HOOKS_FINISHED]: new Map(),
|
|
425
|
+
[TestFrameworkConstants.KEY_TEST_UUID]: uuidv4(),
|
|
426
|
+
// The feature never ran, so no Examples row was selected and there is nothing to
|
|
427
|
+
// qualify: the raw scenario name is name, scope and identifier alike. No tags either
|
|
428
|
+
// — legacy's cascade payload has no world to read them from.
|
|
429
|
+
[TestFrameworkConstants.KEY_TEST_ID]: scenario.name,
|
|
430
|
+
[TestFrameworkConstants.KEY_TEST_NAME]: scenario.name,
|
|
431
|
+
[TestFrameworkConstants.KEY_TEST_SCOPE]: scenario.name,
|
|
432
|
+
[TestFrameworkConstants.KEY_TEST_SCOPES]: [feature.name || ''],
|
|
433
|
+
[TestFrameworkConstants.KEY_TEST_CODE]: null,
|
|
434
|
+
[TestFrameworkConstants.KEY_TEST_RESULT]: 'skipped',
|
|
435
|
+
[TestFrameworkConstants.KEY_TEST_STARTED_AT]: now,
|
|
436
|
+
[TestFrameworkConstants.KEY_TEST_ENDED_AT]: now,
|
|
437
|
+
[TestFrameworkConstants.KEY_TEST_RESULT_AT]: now,
|
|
438
|
+
...this.featureFilePathEntries(),
|
|
439
|
+
[KEY_TEST_SKIPPED_CASCADE]: true,
|
|
440
|
+
[KEY_BDD_META_INFO]: {
|
|
441
|
+
feature: { name: feature.name, path: this.featureUriForMeta(), description: feature.description },
|
|
442
|
+
scenario: { name: scenario.name },
|
|
443
|
+
steps: (scenario.steps || []).map((step) => ({
|
|
444
|
+
id: step.id,
|
|
445
|
+
text: step.text,
|
|
446
|
+
keyword: step.keyword,
|
|
447
|
+
result: 'skipped',
|
|
448
|
+
})),
|
|
449
|
+
examples: [],
|
|
450
|
+
},
|
|
451
|
+
});
|
|
452
|
+
return instance;
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* Whether the scenario in flight failed in a STEP rather than only in a hook. Kept for
|
|
456
|
+
* callers that have no access to the legacy step store.
|
|
457
|
+
*/
|
|
458
|
+
hasStepFailures() {
|
|
459
|
+
return this.scenarioSteps.some(step => step.result === 'FAILED');
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* Route a console log to the row it belongs on: the open hook's uuid while a hook is in
|
|
463
|
+
* flight and unfinished, otherwise the scenario's.
|
|
464
|
+
*
|
|
465
|
+
* The record always goes into KEY_TEST_LOGS, because the send path
|
|
466
|
+
* (`testHubModule.onAllTestEvents`) collects the test logs plus the last FINISHED hook's — a
|
|
467
|
+
* record parked on a still-open hook's own array would never be picked up. Routing rides on
|
|
468
|
+
* KEY_HOOK_ID, which `sendLogCreatedEvent` reads in preference to the test uuid.
|
|
469
|
+
*
|
|
470
|
+
* Not delegated to `WdioMochaTestFramework.loadLogEntries()`: its hook check is
|
|
471
|
+
* `matchHookRegex(instance.getCurrentTestState().toString())`, which tests the fully-qualified
|
|
472
|
+
* `TestFrameworkState.BEFORE_ALL` against an anchored `^(BEFORE_|AFTER_)` and never matches.
|
|
473
|
+
*/
|
|
474
|
+
loadLogEntry(instance, logEntry) {
|
|
475
|
+
if (!logEntry) {
|
|
476
|
+
return;
|
|
477
|
+
}
|
|
478
|
+
const { level, message, timestamp, kind } = logEntry;
|
|
479
|
+
const logRecord = {
|
|
480
|
+
// SDK-6277 forwards a saveScreenshot() result through this same state with
|
|
481
|
+
// kind: 'TEST_SCREENSHOT'; hardcoding KIND_LOG would reclassify it as a log line.
|
|
482
|
+
kind: kind ?? TestFrameworkConstants.KIND_LOG,
|
|
483
|
+
message: Buffer.from(message),
|
|
484
|
+
level,
|
|
485
|
+
timestamp,
|
|
486
|
+
};
|
|
487
|
+
if (this.openHook) {
|
|
488
|
+
logRecord[TestFrameworkConstants.KEY_HOOK_ID] = this.openHook.hookId;
|
|
489
|
+
// The uuid alone is not enough: the binary reads the log's own testFrameworkState to
|
|
490
|
+
// decide hook_run_uuid vs test_run_uuid, and at flush time that is 'LOG'. Carrying
|
|
491
|
+
// the hook's state on the record is what makes the pairing survive (row 24).
|
|
492
|
+
logRecord[TestFrameworkConstants.KEY_HOOK_STATE] = this.openHook.key;
|
|
493
|
+
}
|
|
494
|
+
const entries = TestFramework.getState(instance, TestFrameworkConstants.KEY_TEST_LOGS);
|
|
495
|
+
entries.push(logRecord);
|
|
496
|
+
instance.updateMultipleEntries({
|
|
497
|
+
[TestFrameworkConstants.KEY_TEST_LOGS]: entries,
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* Hook lifecycle. Entries are keyed by the short state name, matching how the binary looks
|
|
502
|
+
* them up via `event.test_hooks_started[request.testFrameworkState]`.
|
|
503
|
+
*
|
|
504
|
+
* @returns false when a finish arrived with no recorded start, so the caller emits nothing.
|
|
505
|
+
*/
|
|
506
|
+
trackHookEvents(instance, key, hookState, args) {
|
|
507
|
+
const hooksStarted = TestFramework.getState(instance, TestFrameworkConstants.KEY_HOOKS_STARTED);
|
|
508
|
+
if (!hooksStarted.has(key)) {
|
|
509
|
+
hooksStarted.set(key, []);
|
|
510
|
+
}
|
|
511
|
+
const hooksFinished = TestFramework.getState(instance, TestFrameworkConstants.KEY_HOOKS_FINISHED);
|
|
512
|
+
if (!hooksFinished.has(key)) {
|
|
513
|
+
hooksFinished.set(key, []);
|
|
514
|
+
}
|
|
515
|
+
const updates = {
|
|
516
|
+
[TestFrameworkConstants.KEY_HOOKS_STARTED]: hooksStarted,
|
|
517
|
+
[TestFrameworkConstants.KEY_HOOKS_FINISHED]: hooksFinished,
|
|
518
|
+
};
|
|
519
|
+
if (hookState === HookState.PRE) {
|
|
520
|
+
const hookId = (TestFramework.getState(instance, TestFrameworkConstants.KEY_HOOK_ID) || '');
|
|
521
|
+
const hook = {
|
|
522
|
+
key,
|
|
523
|
+
[TestFrameworkConstants.KEY_HOOK_ID]: hookId,
|
|
524
|
+
[TestFrameworkConstants.KEY_HOOK_RESULT]: TestFrameworkConstants.DEFAULT_HOOK_RESULT,
|
|
525
|
+
[TestFrameworkConstants.KEY_EVENT_STARTED_AT]: new Date().toISOString(),
|
|
526
|
+
[TestFrameworkConstants.KEY_HOOK_LOGS]: [],
|
|
527
|
+
[TestFrameworkConstants.KEY_HOOK_NAME]: this.hookName(key),
|
|
528
|
+
// A hook's scope is the FEATURE name for all four types. `event.test_scope` is the
|
|
529
|
+
// examples-qualified scenario name, and an ALL hook has no scenario data at all,
|
|
530
|
+
// so the binary reads this key off the hook record first.
|
|
531
|
+
[KEY_HOOK_SCOPE]: this.cucumberData.feature?.name,
|
|
532
|
+
...this.featureFilePathEntries(),
|
|
533
|
+
};
|
|
534
|
+
hooksStarted.get(key)?.push(hook);
|
|
535
|
+
updates[WdioCucumberTestFramework.KEY_HOOK_LAST_STARTED] = key;
|
|
536
|
+
this.openHook = { key, hookId };
|
|
537
|
+
this.lastHookFinishOrphaned = false;
|
|
538
|
+
instance.updateMultipleEntries(updates);
|
|
539
|
+
logger.debug(`trackHookEvents: hook started hookState=${key} name=${hook[TestFrameworkConstants.KEY_HOOK_NAME]}`);
|
|
540
|
+
return true;
|
|
541
|
+
}
|
|
542
|
+
const hooksList = hooksStarted.get(key) || [];
|
|
543
|
+
if (hooksList.length === 0) {
|
|
544
|
+
logger.warn(`trackHookEvents: hook finish for hookState=${key} has no recorded start — dropping the finish and any cascade`);
|
|
545
|
+
this.openHook = null;
|
|
546
|
+
this.lastHookFinishOrphaned = true;
|
|
547
|
+
instance.updateMultipleEntries(updates);
|
|
548
|
+
return false;
|
|
549
|
+
}
|
|
550
|
+
const hook = hooksList.pop();
|
|
551
|
+
const hookResult = args.result;
|
|
552
|
+
if (hookResult) {
|
|
553
|
+
// passed / failed only — the hook path has no 'skipped' arm, unlike the scenario path.
|
|
554
|
+
// Leaving hook_result at 'pending' makes the binary coerce a finished hook to
|
|
555
|
+
// 'passed', so a failing before-hook would show green while the runner exits 1.
|
|
556
|
+
hook[TestFrameworkConstants.KEY_HOOK_RESULT] = hookResult.passed ? 'passed' : 'failed';
|
|
557
|
+
// WDIO reports hook duration as plain ms on the result, not as cucumber's Duration.
|
|
558
|
+
hook[KEY_HOOK_RETRIES] = hookResult.retries;
|
|
559
|
+
hook[KEY_HOOK_DURATION] = hookResult.duration;
|
|
560
|
+
}
|
|
561
|
+
else {
|
|
562
|
+
logger.warn(`trackHookEvents: no result on the hook finish for '${key}'; result stays pending`);
|
|
563
|
+
}
|
|
564
|
+
hook[TestFrameworkConstants.KEY_EVENT_ENDED_AT] = new Date().toISOString();
|
|
565
|
+
hooksFinished.get(key)?.push(hook);
|
|
566
|
+
updates[WdioCucumberTestFramework.KEY_HOOK_LAST_FINISHED] = key;
|
|
567
|
+
this.openHook = null;
|
|
568
|
+
this.lastHookFinishOrphaned = false;
|
|
569
|
+
instance.updateMultipleEntries(updates);
|
|
570
|
+
logger.debug(`trackHookEvents: hook finished hookState=${key} result=${hook[TestFrameworkConstants.KEY_HOOK_RESULT]}`);
|
|
571
|
+
return true;
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
//# sourceMappingURL=wdioCucumberTestFramework.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wdioCucumberTestFramework.js","sourceRoot":"","sources":["../../../src/cli/frameworks/wdioCucumberTestFramework.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAA;AACnC,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,OAAO,aAAa,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,kBAAkB,E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,GAAG,IAAI,CAAC,MAA2C,CAAA;QACnE,IAAI,UAAU,EAAE,CAAC;YACb,uFAAuF;YACvF,8EAA8E;YAC9E,gFAAgF;YAChF,IAAI,CAAC,sBAAsB,CAAC,eAAe,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAA;YACtF,oFAAoF;YACpF,IAAI,CAAC,gBAAgB,CAAC,GAAG,UAAU,CAAC,OAAO,CAAA;YAC3C,IAAI,CAAC,iBAAiB,CAAC,GAAG,UAAU,CAAC,QAAQ,CAAA;QACjD,CAAC;aAAM,CAAC;YACJ,MAAM,CAAC,IAAI,CAAC,sDAAsD,GAAG,yBAAyB,CAAC,CAAA;QACnG,CAAC;QACD,IAAI,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAA;QAC1E,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;QAClC,OAAO,CAAC,yBAAyB,CAAC,sBAAsB,CAAC,GAAG,GAAG,CAAA;QAC/D,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA;QACpB,IAAI,CAAC,sBAAsB,GAAG,KAAK,CAAA;QACnC,QAAQ,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAA;QACvC,MAAM,CAAC,KAAK,CAAC,4CAA4C,GAAG,WAAW,IAAI,CAAC,sBAAsB,CAAC,eAAe,CAAC,EAAE,CAAC,CAAA;QACtH,OAAO,IAAI,CAAA;IACf,CAAC"}
|
package/build/cli/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { ChildProcess } from 'node:child_process';
|
|
|
3
3
|
import type { StartBinSessionResponse } from '../grpc/index.js';
|
|
4
4
|
import type BaseModule from './modules/baseModule.js';
|
|
5
5
|
import type { Options } from '@wdio/types';
|
|
6
|
-
import
|
|
6
|
+
import type TestFramework from './frameworks/testFramework.js';
|
|
7
7
|
import WdioAutomationFramework from './frameworks/wdioAutomationFramework.js';
|
|
8
8
|
import type { BrowserstackConfig, BrowserstackOptions } from '../types.js';
|
|
9
9
|
/**
|
|
@@ -25,7 +25,7 @@ export declare class BrowserstackCLI {
|
|
|
25
25
|
isChildConnected: boolean;
|
|
26
26
|
binSessionId: string | null;
|
|
27
27
|
modules: Record<string, BaseModule>;
|
|
28
|
-
testFramework:
|
|
28
|
+
testFramework: TestFramework | null;
|
|
29
29
|
cliParams: Record<string, string> | null;
|
|
30
30
|
automationFramework: WdioAutomationFramework | null;
|
|
31
31
|
SDK_CLI_BIN_PATH: string | null;
|
|
@@ -140,7 +140,7 @@ export declare class BrowserstackCLI {
|
|
|
140
140
|
* Get the test framework
|
|
141
141
|
* @returns {Object} The test framework
|
|
142
142
|
*/
|
|
143
|
-
getTestFramework():
|
|
143
|
+
getTestFramework(): TestFramework | null;
|
|
144
144
|
/**
|
|
145
145
|
* Get the automation framework
|
|
146
146
|
* @returns {Object} The automation framework
|
package/build/cli/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAK7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAC/D,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAA;AAErD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAK7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE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