This tutorial explains how to automate your instrumented tests from your desktop and run them locally or in using the command line tool gmsaas
for Genymotion SaaS.
Please refer to gmsaas user guide for gmsaas
installation and usage.
Important
1. Create and start your instance
Use the command:
gmsaas instances start <RECIPE_UUID> <INSTANCE_NAME>
<RECIPE_UUID>
is the recipe identifier and <INSTANCE_NAME>
is the name you wish to give to the instance. Once up, the command returns and shows the <INSTANCE_UUID>
.
Note
The list of available recipes can be retrieved using this command: gmsaas recipes list
2. Connect the instance to ADB
gmsaas instances adbconnect <INSTANCE_NAME> [--adb-serial-port <VALUE>]
3. Run your instrumented tests
You can use gradlew CLI or AndroidStudio:
./gradlew connectedAndroidTest
- AndroidStudio in Gradle toolbox: Tasks > verification > connectedAndroidTest
You can view your tests running in the virtual device by signing in to Genymotion SaaS.
4. Stop the virtual devices
gmsaas instances stop <INSTANCE_UUID>
<INSTANCE_UUID>
is the UUID (not the name!) of the instance used for the test. All data generated on the virtual device during the tests are destroyed.