Skip to content

feat(v8): add skipAppOverride service option#50

Open
Bhargavi-BS wants to merge 1 commit into
v8from
feat/skip-app-override-v8
Open

feat(v8): add skipAppOverride service option#50
Bhargavi-BS wants to merge 1 commit into
v8from
feat/skip-app-override-v8

Conversation

@Bhargavi-BS

@Bhargavi-BS Bhargavi-BS commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Port of webdriverio/webdriverio#15374 (the v8 backport of webdriverio/webdriverio#15373) to the standalone repo, targeting the v8 branch.

What this adds

A skipAppOverride service option for App Automate (Appium) runs — same feature as the main port, #49.

With skipAppOverride: true, the service:

  1. Classifies the session as App Automate even when no app option is set.
  2. Does not upload an app.
  3. Does not inject an appium:app capability — the user supplies the app reference themselves (pre-uploaded bs:// hash as a driver capability, or BROWSERSTACK_APP_ID).
  4. Emits a one-time warning so the behaviour is explicit.

Edge cases:

  • skipAppOverride: true with an app option → conflict warning, the app option is ignored; the run proceeds as App Automate.
  • skipAppOverride: false with no app → fails fast with a SevereServiceError before any session starts.
  • Unset → existing behaviour is unchanged.

The option is never forwarded to the hub in bstack:options (added to NOT_ALLOWED_KEYS_IN_CAPS).

Files changed

All in packages/browserstack-service:

  • src/types.ts — declare the skipAppOverride?: boolean option (with JSDoc).
  • src/config.ts — App Automate classification honors the option.
  • src/service.ts — the worker-local _isAppAutomate() honors the option.
  • src/util.ts — new validateSkipAppOverride() (warning + the three edge cases).
  • src/launcher.ts — invoke the validator once in onPrepare; the false+no-app case surfaces as SevereServiceError.
  • src/constants.ts — add skipAppOverride to the capabilities strip-list.
  • src/cli/modules/automateModule.ts — session name/status endpoint routing honors the option.
  • Tests: new tests/skipAppOverride.test.ts, plus updates to service.test.ts, insights-handler.test.ts, tests/cli/modules/automateModule.test.ts.
  • .changeset/feat-skip-app-override-v8.mdminor changeset.

Port notes (drift vs upstream)

The upstream backport was authored against webdriverio/webdriverio@v8, which carries changes this repo's v8 hasn't synced. One hunk was adapted rather than taken verbatim:

  • src/constants.ts — upstream's strip-list already contains testManagementOptions (a separate upstream change not present here), so only skipAppOverride was appended to this repo's current list.

Verification

  • npx tsc --noEmit -p packages/browserstack-service clean (after npm run generate); npm run build (tsc -p tsconfig.prod.json) also exits 0.
  • Package test suite: 41/42 test files green — the one failing file is tests/crash-reporter.test.ts, which is pre-existing on v8 (it imports from build/ and needs npm run build first; it passes 8/8 once built). The four port-relevant files pass 215/215 in isolation (skipAppOverride.test.ts, service.test.ts, insights-handler.test.ts, cli/modules/automateModule.test.ts).
  • On-device verification was done on the upstream PRs (App Automate, Samsung Galaxy S23 / Android 13): skipAppOverride: true with the app supplied via an appium:app cap → App Automate session created, one-time warning, no upload; true + an app option → conflict warning, option ignored, no upload; false with no app → fails fast before any session starts.

🤖 Generated with Claude Code

Port of webdriverio/webdriverio#15374 (v8 backport of #15373) to the
standalone repo.

With skipAppOverride: true the service classifies the session as App
Automate even when no app option is set, skips the app upload, and does
not inject an appium:app capability — the user supplies the app
reference themselves. Conflicting app option is warned about and
ignored; skipAppOverride: false with no app fails fast before any
session starts. The option is stripped from bstack:options and never
forwarded to the hub.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Bhargavi-BS Bhargavi-BS requested a review from a team as a code owner July 15, 2026 14:49
@Bhargavi-BS Bhargavi-BS requested review from amaanbs and vivianludrick and removed request for a team July 15, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant