Can Genymotion Cloud run Detox tests in CI?

High Confidence (79%)
Detox Jest GitLab CI Genymotion Cloud device image API example run Detox tests in CI Genymotion documentation

✅ YES — Genymotion Cloud (SaaS / Device Image) supports running Detox tests in CI by provisioning Android virtual devices via its HTTP API or CLI and connecting to them with ADB. You should use Genymotion SaaS / Device Image (not Genymotion Desktop) and then run your usual Detox/Jest commands against the provisioned device.

Supporting details and a minimal GitLab CI example and steps

  • Genymotion supports Detox and exposes an HTTP API and CLI to create/start cloud devices. See product pages: and .
  • High-level flow: (1) build your Android test APK(s) in the CI job, (2) request/start a Genymotion cloud device, (3) connect to it with ADB, (4) install APKs, (5) run detox test (Jest runner), (6) stop/destroy the device.

Example GitLab CI job (adapt keys, device image, and build steps to your repo):

stages: [test]
detox_tests:
  image: node:20
  variables:
    GNY_API_KEY: $GNY_API_KEY
  before_script:
    - apt-get update && apt-get install -y adb curl jq openjdk-11-jdk
    - npm ci
    - npm install -g detox-cli
  script:
    # 1) Build app and test apk (example using Gradle)
    - cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..
    # 2) Start a Genymotion cloud device and capture ID / adb endpoint
    - DEVICE_JSON=$(curl -s -X POST "https://api.genymotion.cloud/devices" -H "Authorization: Bearer $GNY_API_KEY" -d '{"image":"pixel-11-arm64"}')
    - DEVICE_ID=$(echo "$DEVICE_JSON" | jq -r .id)
    - ADB_ADDRESS=$(echo "$DEVICE_JSON" | jq -r .adb_address) # adjust field name per API
    # 3) Wait for device and connect
    - until adb connect "$ADB_ADDRESS"; do sleep 2; done
    - adb wait-for-device
    # 4) Install APKs
    - adb install -r android/app/build/outputs/apk/debug/app-debug.apk
    - adb install -r android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk
    # 5) Run Detox tests
    - npx detox test --configuration android.emu.release
    # 6) Tear down device
    - curl -s -X DELETE "https://api.genymotion.cloud/devices/$DEVICE_ID" -H "Authorization: Bearer $GNY_API_KEY"

Notes and tips

  • Adjust API JSON fields and endpoints to match the Genymotion API/CLI response for adb host:port or SSH tunnel. See the PaaS docs and quickstarts for exact API/CLI usage: and .
  • Use adb connect <host:port> or the Genymotion CLI's ADB bridge as provided by the cloud response. Poll device boot state before installing APKs.
  • For parallel Detox shards, create multiple devices and run tests in parallel jobs. Genymotion billing is per running device; see pricing notes: .

Which Detox configuration do you use (Android emulator config in your detox .testrc or package.json), and do you need parallel shards or a single-device run?