feat(LCAM-1282): central-user test metadata, GRR URL guard, build grouping identifier (v8) - #78
feat(LCAM-1282): central-user test metadata, GRR URL guard, build grouping identifier (v8)#78ashish0305 wants to merge 5 commits into
Conversation
…uping identifier Port of ashish0305/webdriveriolc#1 ("support of setting metadata") onto the v8 line of the extracted standalone repo (packages/browserstack-service/src). - Add BrowserStackSDK.setTestMetadata() + TestMetadata store, gated on the app_lcnc central user (BROWSERSTACK_CENTRAL_USER). Metadata is keyed per test-run uuid with a fallback and attached to the TestFramework event and the reporter's BTCER payload. - Emit central-user keys in the TestHub product maps. - APIUtils.updateURLSForGRR: validate the GRR URL set via a hasValidGRRUrls type guard and no-op (return false) when incomplete, preventing the TypeError -> prod-collector fallback. - Send grouping_identifier (BROWSERSTACK_BUILD_GROUPING_IDENTIFIER) on build launch. - Force result='skipped' for TestRunSkipped so downstream status is correct. Existing specs updated for the new app_lcnc product-map key and the onBeforeTest instance arg. Build + full test suite pass locally on v8. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
🔴 SDK PR Review gate is red. Pending:
It turns green once the latest SDK PR Review Agent run reports GTG on the current head commit. A native reviewer approval is separately required by branch protection before merge. |
|
🔴 SDK PR Review gate is red. Pending:
It turns green once the latest SDK PR Review Agent run reports GTG on the current head commit. A native reviewer approval is separately required by branch protection before merge. |
|
🔴 SDK PR Review gate is red. Pending:
It turns green once the latest SDK PR Review Agent run reports GTG on the current head commit. A native reviewer approval is separately required by branch protection before merge. |
Code review — App LCNC rollout (
|
What is this about?
Adds central-user test-metadata support to the BrowserStack WebdriverIO service on the v8 line into this extracted standalone repo (
packages/browserstack-service/src).BrowserStackSDK.setTestMetadata({ identifier, ... })public API backed by a per-test-runTestMetadatastore, gated on theapp_lcnccentral user (BROWSERSTACK_CENTRAL_USER). Metadata is attached to the TestFramework gRPC event and the reporter's BTCER payload.getCentralUser()central-user mode; its keys are merged into the TestHub product maps.APIUtils.updateURLSForGRRvalidates the GRR URL set via ahasValidGRRUrlstype guard and no-ops (returnsfalse) when incomplete — prevents the TypeError → prod-collector fallback.grouping_identifier(BROWSERSTACK_BUILD_GROUPING_IDENTIFIER) on build launch.result = 'skipped'forTestRunSkipped(mocha setsstate = 'pending').Verified locally on v8:
npm run buildpasses and the full test suite is green (42/42 files). Supersedes the accidentally main-based PR #72.Related Jira task/s
LCAM-1282 — App LCA SDK integration (WebdriverIO service, v8).
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)
BrowserStackSDK.setTestMetadata()for central-user integrations.Release notes (internal): (required — engineer-facing; what actually changed / why)
testHub/utils,funnelInstrumentation, andtestHubModulespecs for the newapp_lcncproduct-map key /onBeforeTestinstance arg.Checklist
PR Validations
Run Tests: Comment RUN_TESTS to trigger sanity tests.
🤖 Generated with Claude Code
🔗 Related PRs — SDK + App A11y Deploy Plan
📄 Deploy plan: SDK + App A11y Deploy Plan
SDK artifacts
Config
Backend services
Staging URL support for App A11y scans