Skip to content

feat(e2e): run e2e tests on DeviceCloud devices with @devicecloud.dev… - #346

Merged
finalerock44 merged 1 commit into
devfrom
feat/e2e-device-provider
Nov 23, 2026
Merged

finalerock44 merged 1 commit into
devfrom
feat/e2e-device-provider

Conversation

@finalerock44

Copy link
Copy Markdown
Contributor

…/dcd/e2e

A device provider for e2e (github.com/e2e-inc/e2e), published as a new entry point of this package. Each e2e worker gets its own DeviceCloud device session: the provider starts it, waits until the device is up and the build is installed, then hands e2e the address of the session's own agent-device daemon. e2e drives the device directly; the session is an ordinary one, in the console, recorded and billed as any other. Early access: the organization needs it turned on.

  • Credentials as the CLI takes them: DEVICE_CLOUD_API_KEY from the run's environment (or an apiKey option), DCD_API_URL checked by the same rules as --api-url before the key is sent anywhere.
  • The target's app.appPath is uploaded the way dcd upload does, once per run however many workers ask, and the lease reports installedApp so e2e installs nothing itself. appBinaryId uses a build already uploaded.
  • Polls and the engine request are sent again when the network loses one, as dcd device waits are; a session start never is. A failed acquire stops the session it started.
  • The e2e types are described by shape, so the package gains no dependency. Importing the entry point has no side effects.
  • package.json gains an exports map: ".", "./e2e", "./package.json", and "./dist/*" so every path that could be imported before still can.

Checked with the packed package in a project of its own: the config type- checks against e2e 0.23.1 / @e2e-dev/mobile 0.12.7 and 0.24.0 / 0.12.8, and a deterministic test passed on a real device with both, uploading the APK from a local path.

What & why

Type of change

  • fix — bug fix
  • feat — new feature
  • perf — performance improvement
  • refactor — code change that's neither a fix nor a feature
  • docs — documentation only
  • chore / ci / build / test — tooling, no user-facing change
  • Breaking change (title has ! or PR notes a BREAKING CHANGE:)

Checklist

  • PR title follows the Conventional Commits format (see comment above)
  • pnpm lint passes
  • pnpm typecheck passes
  • pnpm build passes
  • I have not bumped the version or edited CHANGELOG.md (the release workflow handles this)
  • I have signed the CLA (the bot will prompt on first contribution)
  • Docs / README.md / STYLE_GUIDE.md updated if behaviour or output changed

How to test

…/dcd/e2e

A device provider for e2e (github.com/e2e-inc/e2e), published as a new
entry point of this package. Each e2e worker gets its own DeviceCloud device
session: the provider starts it, waits until the device is up and the build
is installed, then hands e2e the address of the session's own agent-device
daemon. e2e drives the device directly; the session is an ordinary one, in
the console, recorded and billed as any other. Early access: the
organization needs it turned on.

- Credentials as the CLI takes them: DEVICE_CLOUD_API_KEY from the run's
  environment (or an apiKey option), DCD_API_URL checked by the same rules
  as --api-url before the key is sent anywhere.
- The target's app.appPath is uploaded the way `dcd upload` does, once per
  run however many workers ask, and the lease reports installedApp so e2e
  installs nothing itself. appBinaryId uses a build already uploaded.
- Polls and the engine request are sent again when the network loses one,
  as `dcd device` waits are; a session start never is. A failed acquire
  stops the session it started.
- The e2e types are described by shape, so the package gains no
  dependency. Importing the entry point has no side effects.
- package.json gains an exports map: ".", "./e2e", "./package.json", and
  "./dist/*" so every path that could be imported before still can.

Checked with the packed package in a project of its own: the config type-
checks against e2e 0.23.1 / @e2e-dev/mobile 0.12.7 and 0.24.0 / 0.12.8, and a
deterministic test passed on a real device with both, uploading the APK from
a local path.
@finalerock44 finalerock44 self-assigned this Nov 23, 2026
@claude

claude Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

@finalerock44
finalerock44 merged commit d772c53 into dev Nov 23, 2026
10 checks passed
@finalerock44
finalerock44 deleted the feat/e2e-device-provider branch November 23, 2026 13:10
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