Repository navigation
SDK-7772 WDIO Jasmine v9 platformisation - #244
Open
AdityaHirapara wants to merge 27 commits into
Open
AdityaHirapara wants to merge 27 commits into
AdityaHirapara wants to merge 27 commits into
Conversation
…772) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… CLI feed (SDK-7772) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nly (SDK-7772) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gs on CLI (SDK-7772) - service hooks classify jasmine hooks by the WDIO hookName instead of the mocha title; the mocha skip cascade stays mocha-only - beforeTest annotates each jasmine spec with `Test: <fullName>` on the CLI flow - jasmine registers the command listener on the CLI flow; browserCommand sends HTTP command logs over gRPC (LogEntry kind HTTP) to the spec it names, and jasmine screenshots name their spec the same way - the jasmine class sends a session event for every beforeAll/afterAll start so hook runs carry their platform and Automate session, as on the legacy flow Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…SDK-7772)
- WdioJasmineTestFramework keeps the legacy service.after() inputs: specs ran,
the runner's failed-spec count, and the test and hook failure reasons of the
live session in the order they happened
- AutomateModule marks a jasmine worker's live session with that verdict, in
the legacy body shape {status, name, reason}; a session no spec registered is
still marked and a reloaded session keeps the mark onReload sent
- ignoreHooksStatus is read from the worker's service options, because the
binary config echo carries testObservabilityOptions empty
- other frameworks keep the existing per-test aggregation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…apabilities (port of 3cdbfec, SDK-7772) Port of 3cdbfec from SDK-7606/wdio-cucumber-platformisation-v8. sessionNamePrependTopLevelSuiteTitle and sessionNameOmitTestTitle reach the outgoing capabilities on the CLI flow and the hub rejects the session ("additional properties [...] outside of the schema"). Both are read from testContextOptions, so stripping them from the capabilities does not disable either option. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…K-7772) The binary config echo cannot carry the sessionNameFormat function, so it arrives empty and the session keeps its default name. For jasmine the AutomateModule now takes the function from the worker's service options, called as legacy did (no test title). Other frameworks are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- no scan window before the first jasmine spec, as the classic handler (PRE_TEST_SCAN_FRAMEWORKS excludes jasmine); mocha/cucumber keep it - the include/exclude filter and the test name read the jasmine spec description when the test has no title Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… CLI (SDK-7772) PercySDK attaches testCase from TestReporter.currentTest.name, which legacy sets while building the TestRunStarted event. The jasmine CLI branch of onTestStart returns before that, so CLI snapshots carried no testCase. It now sets the name next to the CLI uuid. Mocha is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nary (SDK-7772) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o the binary (SDK-7772) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
… (SDK-7772) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and insights-handler suites (SDK-7772) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s session verdict to AutomateModule (SDK-7772) The reporter now feeds WdioJasmineTestFramework through trackEvent with source 'reporter'; reporter events are applied before trackEvent awaits, and TEST PRE hands the minted uuid back on args.testUuid. TestHubModule is wired once in loadModules instead of on every reporter event. service.after() passes legacy's session verdict inputs (runner result, specsRan and the three reason lists) on EXECUTE POST for jasmine only; AutomateModule computes the verdict from them, so the framework class no longer keeps verdict state. The pending-event counter and isIdle() are per instance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…chained toISOString (SDK-7772) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…SDK-7772) The per-test `Test: <fullName ?? title>` Automate annotation moves from the jasmine-only arm of service.beforeTest into AutomateModule.onBeforeTest, so mocha on the CLI flow annotates its tests again, as it did on the legacy flow. Cucumber keeps its own Feature/Scenario/Step annotations. Skip reports carry `skipReport: true` on TEST/PRE and are not annotated, since beforeTest never ran for a skipped test. A failed annotate is logged and does not break the hook. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…772) TestHubModule registers the command/result listeners once per browser on driver creation, gated as before on shouldProcessEventForTesthub, and pairs results on the live session id. Screenshots go to every framework and HTTP command logs only to frameworks that opt in through capturesHttpCommandLogs(), which only jasmine does. Entries carry `commandLog: true` and the framework attributes them: - jasmine sends them to the last started spec, cleared by an `<unknown test>` so they drop until the next spec, as the runner's own current test does - cucumber drops them until a scenario has started - mocha keeps its LOG rail, so a screenshot in a hook now attaches to the hook run as it did on the legacy flow The service no longer registers CLI listeners, browserCommand keeps only the legacy path, and setTestData no longer seeds the test map that only the removed CLI gate read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and mocha hooks (SDK-7772) Jasmine command logs follow the spec the service's latest beforeTest or beforeHook named, resolved by full name when the command fires, rather than the last spec the reporter started: a trailing pending or excluded spec never takes the session teardown's commands, and a name with no minted spec (`<unknown test>`, or none before the first spec) drops them. The reporter's `<unknown test>` marker goes away. A mocha command log taken while a hook is open carries that hook's id and state, so the binary keys it to the hook run. Console logs are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd logs (SDK-7772) The hooks-started state is a Map, so the record-style lookup never found the open hook and every mocha command log stayed on the test. Command logs now read the open hook from the Map directly; console logs keep their path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mocha and cucumber now opt in to HTTP command logs on the CLI flow, as their legacy flows reported them. As on legacy, they are sent only when LogCreated events are on for the run. A mocha command log follows the hook or test that started last, even after it finished, so a command after a hook (such as the session teardown after `after all`) stays on that hook run as it did on the legacy flow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…id (SDK-7772) Legacy's beforeTest annotated the session before it registered the test, so the annotation's HTTP log never reached Test Observability. The TEST/PRE observers are that start-up on the CLI flow, so mocha now drops command logs until they finish. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t ran (SDK-7772) A skip report moves mocha's tracked instance to the skipped test, so the session teardown's HTTP log landed on a skipped test. A command log outside any hook now goes to the last test that ran, as legacy's current test did. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ork reports them (SDK-7772) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…7772) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…p (SDK-7772) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this about?
Moves WebdriverIO + Jasmine (v9) from the legacy in-SDK flow onto the CLI/binary flow, at functional parity with legacy jasmine. Products: Test Observability, web Accessibility, Automate / App Automate session marking, and Percy. Legacy stays as the runtime fallback (binary unavailable, multiremote). Paired binary PR: browserstack/browserstack-binary#1837, which must be released first.
Jasmine on the CLI flow
jasmineis added toCLISupportedFrameworks, with a newWdioJasmineTestFramework.fit-excluded andbeforeAll-failed specs, plusbeforeAll/afterAllwith their suite. The awaited service hooks are the only points with a live driver at each spec's start and end.trackEvent(the reporter withsource: 'reporter').fullName), and reach Accessibility, Automate and Percy through the dispatcher withskipTestHub.TestHubModuleignores those events.isSynchroniseddrains the queue before the worker exits.sessionNameFormat,sessionNameOmitTestTitleandsessionNamePrependTopLevelSuiteTitlebehave as on legacy. The session verdict is legacyservice.after()'s rule, computed inAutomateModulefrom the inputsservice.after(result)already tracks, and only the live session is marked (a reloaded one keeps itsonReloadmark).Shared CLI changes (all WDIO frameworks)
TestHubModule. The WebDriver command/result listeners are registered once per browser at driver creation, instead of inservice.before()andinsights-handler. Each framework class decides which test or hook a log belongs to. The legacy path is untouched.Test: …annotation now comes fromAutomateModulefor mocha and jasmine, never cucumber. This restores mocha's annotation, which the CLI flow had dropped.--browserstack.testManagementOptions.testPlanId <id>is now sent as the id. Previously the binary receivedtruefrom the space-separated form. Config and env variants are unchanged.sessionNamePrependTopLevelSuiteTitle/sessionNameOmitTestTitleare kept out of capabilities.Verification
ignoreHooksStatus,setSessionStatus:false/setSessionName:false, reload,beforeAllfailure.Known issues (existing before this PR; tickets to follow)
bstack:options.buildTagis dropped by the binary on the CLI flow, for every WDIO framework.Before/Afterhooks attach to the hook run; legacy attached them to the scenario.Related Jira task/s
Release (mandatory for every PR — required for the
ready-for-reviewlabel)Version bump: (required — tick exactly one)
Release notes type: (optional)
Release notes (customer-facing): (optional but encouraged)
--browserstack.testManagementOptions.testPlanId <id>passed on the command line not reaching Test Management.Release notes (internal): (required — engineer-facing; what actually changed / why)
WdioJasmineTestFrameworkand enabledjasmineinCLISupportedFrameworks. The reporter feeds TestHub through an ordered queue; awaited service hooks feed the Accessibility, Automate and Percy modules withskipTestHub.AutomateModule;service.after()passes legacy verdict inputs for jasmine only.service.ts/insights-handler.tsintoTestHubModule, with framework-class attribution. Enabled HTTP command logs for mocha and cucumber.AutomateModule(mocha + jasmine); skip reports are not annotated.stripTestPlanIdArgremoves the CLI-arg test plan id before forwarding argv to the binary.getBinConfigresolves it throughgetTestPlanId.Checklist
PR Validations
Run Tests: Comment RUN_TESTS to trigger sanity tests.
🤖 Generated with Claude Code