feat(provider-webdriver): add TestMu AI device cloud provider

Merged
AM
2mo ago
+4199-220

Summary

Adds TestMu AI (formerly LambdaTest) as a managed provider plugin, @agent-device/testmu, built on the plugin foundation from #3121. It drives TestMu AI Android emulators, iOS simulators and real devices through the core's shared WebDriver engine.

agent-device plugins add @agent-device/testmu
export LT_USERNAME=... LT_ACCESS_KEY=...
agent-device connect testmu --platform ios --device "iPhone 16" --provider-os-version 18.0 --provider-app ./MyApp.zip
agent-device open com.example.app && agent-device snapshot -i && agent-device close

What's in it:

  • packages/provider-testmu: the plugin. It covers the provider definition, credentials and endpoints, the device catalogue with exact OS-version matching, uploads for virtual and real devices, lt:// references, device-feature mapping, session details and artifacts.
  • Plugin seam: the WebDriver plugin route and the plugin connect route in src/plugins. There's a provider-webdriver/plugin subpath with the single shared lease-flag and credential readers (requireRequest, requireFlag, readFlag, requireEnv, …) and canonicalSchemeReference, and one reserved provider-id list.
  • providerDeviceType (--provider-device-type real|virtual, default virtual): TestMu consumes it, and BrowserStack, AWS Device Farm and Limrun refuse it through #3168's admission.
  • Docs: website/docs/docs/testmu.md, plus the plugin and device-cloud pages.

The reusable core fixes landed separately in #3165, #3166, #3169, #3221 and #3168.

Behaviour change: requireEnv is now shared, so a whitespace-only BrowserStack or AWS credential is refused as missing before any network call, instead of failing later as an authentication error.

Validation

At 6b19fdeee:

  • build, the plugin build, typecheck, lint and format:check pass, and so do the eager-closure and test-size ratchets.
  • fallow audit reports no issues.
  • check-provider-plugin passes: packed install, host errors and CLI connect.
  • check:affected runs 13,820 tests, all passing except remote-proxy-parity, which fails the same way on unmodified main locally.
  • typecheck also passes from a clean checkout with no build.

Live on TestMu AI production at 6b19fdeee, with the plugin installed through agent-device plugins add. Each run went connect → open → snapshot -i → screenshot → close → artifacts --json, every step returned rc=0, and 7 artifacts were ready each time:

Scenarioopensession
Galaxy S22 Ultra 5G / 14 emulator, local .apk59 s12685a4d-c53d-4ab7-bf44-c76c2139b9de
iPhone 16 / 18 real device, signed .ipa28 s1b73a6fe-9e42-4083-ba73-0149e9aa1d16
emulator, install-from-source <.apk URL>58 sc549515e-1c3a-480e-b787-7c7e1418ac3e
iPhone 16 / 18.0 simulator, zipped .app87 sa85b9af1-84e0-43af-95bf-93bdb47b33cb

Known limits are those of the cloud WebDriver runtime: settings, alert, record, logs and portReverse are unsupported.

🤖 Generated with Claude Code