Lesson 18 of 19Article16 min
Genymotion SaaS (Cloud E2E)
GitHub's ubuntu-latest runners do not include Android emulators with KVM by default. Genymotion SaaS provides cloud Android devices accessible via adb — ideal for Detox E2E in CI without maintaining your own emulator farm.
E2E testing in the cloud
GitHub's ubuntu-latest runners do not include Android emulators with KVM by default. Genymotion SaaS provides cloud Android devices accessible via adb — ideal for Detox E2E in CI without maintaining your own emulator farm.
Cost model: pay per minute of device usage. Run full suite nightly (~30 min); smoke tests only on release branches.
Genymotion + Detox nightly flow
Setup steps
- Create account at cloud.geny.io; generate API token.
- Install gmsaas CLI locally to test: brew install genymotion/genymotion/gmsaas.
- Add GENYMOTION_API_TOKEN to GitHub Secrets.
- In workflow: auth → start instance → adb connect → detox build → detox test → stop instance.
- Pin device profile (e.g. Samsung Galaxy S24, Android 14) for consistent results.
Nightly E2E workflow excerpt
e2e-nightly:
runs-on: ubuntu-latest
if: github.event_name == 'schedule'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 20, cache: npm }
- run: npm ci
- name: Start Genymotion cloud device
env:
GENYMOTION_API_TOKEN: ${{ secrets.GENYMOTION_API_TOKEN }}
run: |
gmsaas auth login "$GENYMOTION_API_TOKEN"
INSTANCE=$(gmsaas instances start "Samsung Galaxy S24" "android-14")
gmsaas instances adbconnect "$INSTANCE"
- run: npm run detox:build:android
- run: npm run detox:test:android
- name: Stop instance
if: always()
run: gmsaas instances stop "$INSTANCE"Flaky test management
- Retry failed Detox tests once in CI before marking job failed.
- Record videos/screenshots on failure for debugging.
- Quarantine flaky tests with testNamePattern skip until fixed.
- Track flake rate; aim for under 2% retry rate on nightly runs.