Automated Android testing via Firebase Test Lab — robo tests, instrumentation tests, device matrix configuration, and test result analysis.
Firebase Test Lab is the primary testing mechanism for the Dragon Scale VPN project. It runs tests on real and virtual Android devices in Google's cloud infrastructure, providing screenshots, logs, video recordings, and crash reports.
Primary Test Device: Pixel 10 Pro Fold (codename rango, API 36, physical device)
Robo tests automatically crawl the app UI and detect crashes, layout issues, and ANRs.
# Primary: Pixel 10 Pro Fold (user's actual device)
gcloud firebase test android run --type=robo \
--app=dragon-scale-vpn/app/build/outputs/apk/debug/app-debug.apk \
--device "model=rango,version=36,locale=en,orientation=portrait" \
--timeout=300s --project=cloud-vpn-12110
# Secondary: Medium Phone virtual device (API 34, fast feedback)
gcloud firebase test android run --type=robo \
--app=dragon-scale-vpn/app/build/outputs/apk/debug/app-debug.apk \
--device "model=MediumPhone.arm,version=34" \
--timeout=300s --project=cloud-vpn-12110
# Full matrix: Pixel 10 Pro Fold + Medium Phone + Pixel Fold (legacy foldable)
gcloud firebase test android run --type=robo \
--app=dragon-scale-vpn/app/build/outputs/apk/debug/app-debug.apk \
--device "model=rango,version=36" \
--device "model=MediumPhone.arm,version=34" \
--device "model=felix,version=34" \
--timeout=300s --project=cloud-vpn-12110
For targeted verification of specific features (GeoIP, NetworkMonitor, etc.).
# Build test APK first
$env:JAVA_HOME = "C:\Program Files\Android\Android Studio\jbr"
.\gradlew assembleDebug assembleDebugAndroidTest
# Run on Pixel 10 Pro Fold
gcloud firebase test android run --type=instrumentation \
--app=dragon-scale-vpn/app/build/outputs/apk/debug/app-debug.apk \
--test=dragon-scale-vpn/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk \
--device "model=rango,version=36" \
--timeout=600s --project=cloud-vpn-12110
# List recent test runs
gcloud firebase test android list --project=cloud-vpn-12110
# Get detailed results (URL provided after test run)
gcloud firebase test android results describe <TEST_MATRIX_ID> --project=cloud-vpn-12110
| Priority | Model ID | Device Name | API | Type |
|---|---|---|---|---|
| Primary | rango | Pixel 10 Pro Fold | 36 | Physical |
| Secondary | MediumPhone.arm | Medium Phone 6.4" | 34 | Virtual |
| Foldable Legacy | felix | Pixel Fold | 34 | Physical |
VpnService.prepare() shows a system dialog that can't be auto-dismissedWhen changes impact UI, networking, or stability:
# 1. Build APK
$env:JAVA_HOME = "C:\Program Files\Android\Android Studio\jbr"; .\gradlew assembleDebug
# 2. Run robo test on Pixel 10 Pro Fold
gcloud firebase test android run --type=robo \
--app=dragon-scale-vpn/app/build/outputs/apk/debug/app-debug.apk \
--device "model=rango,version=36" --project=cloud-vpn-12110
# 3. Review the results URL in the output