feat(revyl): add @e2e-dev/revyl for mobile tests on Revyl devices

KA
3d ago
+971-109

Adds @e2e-dev/revyl, a DeviceProvider for the mobile engine that runs tests on Revyl's hosted iOS simulators and Android emulators. Opened by Revyl, following the partner-integration thread.

  • One Revyl device and isolated agent-device daemon per worker, via agent-device's @agent-device/revyl plugin (0.21.37, the engine's agent-device). Built on @e2e-dev/mobile/lease, same shape as @e2e-dev/testmu.
  • Options: app (an https build URL Revyl installs at device start), device (catalog model), optional osVersion. Unknown/invalid options and non-https apps fail config load with INVALID_CONFIG, without echoing the rejected URL; the target's app.appPath is refused.
  • Auth is REVYL_API_KEY (optional REVYL_API_URL), passed only to the daemon's env.
  • Video recording is not supported: Revyl streams the screen to its own viewer and does not expose a recording, so --video fails with UNSUPPORTED_CAPABILITY. Documented under Limits.

Shared changes in @e2e-dev/mobile/lease, from review:

  • agentDevicePlugin(import.meta.resolve('@agent-device/<name>')) returns { assertVersion, prepareHome }, replacing the per-provider daemon.ts copies. @e2e-dev/testmu is migrated onto it.
  • A lease's device selector is used for allocation only and is no longer put on the worker's client, so agent-device does not send it as --device on every command. This replaces the Revyl-only withoutModelName.
  • Both @e2e-dev/revyl and @e2e-dev/testmu now peer on @e2e-dev/mobile >=0.12.8, the release that ships the helper.

Docs: docs/integrations/revyl.mdx, integrations index card and logo, environment and security reference rows, mobile page pointer, AGENTS.md, and the e2e skill setup note (both copies). revyl.svg is a near-black mark (#1C1732), so it needs the same dark-mode filter: invert(1) rule as Expo's and TestMu AI's in the site styles.

import { mobile } from '@e2e-dev/mobile';
import { revyl } from '@e2e-dev/revyl';

export default {
  targets: [
    {
      name: 'android',
      engine: mobile({
        platform: 'android',
        device: revyl({ app: 'https://builds.example.com/app.apk', device: 'Pixel 7', osVersion: 'Android 14' }),
      }),
      app: { bundleId: 'com.example.app' },
    },
  ],
};

Verified

Ran it locally: yes

pnpm check passes, and the tests for @e2e-dev/mobile (539), @e2e-dev/revyl (19), @e2e-dev/testmu (86) and @e2e-dev/browserstack (53) pass. Revyl and TestMu each register their real plugin through agentDevicePlugin and check agent-device lists it as compatible.

Surface: @e2e-dev/revyl linked into a standalone project, running against Revyl production devices. Android installs Appium's public ApiDemos 6.0.18 APK from its GitHub release.

e2e run --target android tests/android.e2e.ts at the review fixes (asserts "Animation" is visible):

ℹ leasing 1 android device(s) from revyl
ℹ revyl (1 of 1): lease 8d51883ab416fb1dabac908da06b222f: Pixel 7, Android 14; Revyl device started
ℹ a booted android device: boot 0.0s, open io.appium.android.apis 1.1s
 ✓ mobile engine for target "android" prepared 8.10s
   ✓ |android| tests/android.e2e.ts > opens API Demos 7.98s
ℹ revyl: released 1 device(s)
      Tests  1 passed (1)

iOS (opens rentals and switches to the fleet tab) passed on agent-device 0.21.36. On 0.21.37, which main's mobile now ships, app.open() and expect pass but every tap fails with window-origin-unknown: 0.21.37 refuses taps unless a snapshot's screen origin is reported, and the Revyl plugin reports its iOS root frame as derived. That is a plugin fix, not this package's; it is going upstream to callstack/agent-device, and iOS taps on Revyl work once a release with it is pinned here.

--video on Android, the documented limit:

UNSUPPORTED_CAPABILITY: start video recording failed: record is not supported on this device Hint: Revyl streams the screen for its own viewer and does not expose a recording.