34 / 66 · 09 Mobile & Cross-Platform Testing · Cloud Device Farms← prev⊞ allnext →☰ Read as one page
6.4Firebase Test Lab for Android
Firebase Test Lab offers a generous free tier and deep integration with the Android ecosystem:
# Run Appium tests on Firebase Test Lab
gcloud firebase test android run \
--type instrumentation \
--app builds/app-release.apk \
--test builds/app-test.apk \
--device model=Pixel7,version=34 \
--device model=oriole,version=33 \
--timeout 10m \
--results-bucket gs://my-test-results \
--results-dir "run-$(date +%Y%m%d-%H%M%S)"
# Run a robo test (automatic exploration)
gcloud firebase test android run \
--type robo \
--app builds/app-release.apk \
--device model=Pixel7,version=34 \
--timeout 5m \
--robo-directives "text:username_field=test@example.com,text:password_field=pass123"
Firebase Robo Tests
Firebase's Robo test automatically crawls your app, tapping buttons and filling forms to discover crashes. This is useful as a smoke test because it requires zero test code:
# .github/workflows/firebase-robo.yml
name: Firebase Robo Test
on:
push:
branches: [main]
jobs:
robo-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_CREDENTIALS }}
- uses: google-github-actions/setup-gcloud@v2
- name: Run Robo test
run: |
gcloud firebase test android run \
--type robo \
--app builds/app-release.apk \
--device model=Pixel7,version=34 \
--device model=a]54x,version=34 \
--timeout 5m
- name: Check for crashes
run: |
RESULTS=$(gcloud firebase test android results describe --format json)
CRASHES=$(echo "$RESULTS" | jq '.testExecutions[].testResults.crashCount')
if [ "$CRASHES" != "0" ]; then
echo "Robo test found crashes!"
exit 1
fi