As described in #511, Genymotion has deprecated credential based login. This adds support for passing in an auth token instead. This could also check for the GENYMOTION_API_TOKEN env variable being set and skipping the login entirely, but I haven't added that in favor of keeping the explicit token check during login. This also updates the default version of the gmsaas package to the latest release.
2.8 KiB
```
export USER="xxx"
export PASS="xxx"
docker run -d -p 4723:4723 -v ${PWD}/example/genycloud/saas.json:/home/androidusr/genymotion_template/saas.json -e DEVICE_TYPE=geny_saas -e GENY_SAAS_USER=${USER} -e GENY_SAAS_PASS=${PASS} -e APPIUM=true --name android-container budtmo/docker-android:genymotion
```
Genymotion Cloud
You can use Genymotion Android virtual devices in the cloud. They are available on SaaS or as virtual images on AWS, GCP or Alibaba Cloud.
-
On SaaS
Use saas.json to define the devices that you want to use. You can specify the port on which the device will start so you don't need to change the device name in your tests every time you need to run those tests. Then run following commandexport AUTH_TOKEN="xxx" docker run -d -p 4723:4723 -v ${PWD}/example/genycloud/saas.json:/home/androidusr/genymotion_template/saas.json -e DEVICE_TYPE=geny_saas -e GENY_AUTH_TOKEN=${AUTH_TOKEN} -e APPIUM=true --name android-container budtmo/docker-android:genymotionGenymotion has deprecated credential based login since gmsaas 1.10.0, but if necessary, you can still provide them using
-e GENY_SAAS_USER=${USER} -e GENY_SAAS_PASS=${PASS}instead of-e GENY_AUTH_TOKEN=${AUTH_TOKEN}.The deployed device(s) are automatically connected with adb inside docker container. Stopping the emulator will remove all deployed device(s) on Genymotion SaaS and user will be logged out at the end.
docker stop android-containerIn case you are interesed to play around with Genymotion on SaaS, you can register to this link to get free minutes for free.
-
On AWS
Use aws.json to define the devices that you want to use. You can specify the port on which the device will start so you don't need to change the device name in your tests every time you need to run those tests. Then run following commandexport AWS_ACCESS_KEY_ID="xxx" export AWS_SECRET_ACCESS_KEY="xxx" docker run -it --rm -p 4723:4723 -v ${PWD}/example/genycloud/aws.json:/home/androidusr/genymotion_template/aws.json -e DEVICE_TYPE=geny_aws -e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} -e GENY_SAAS_PASS=${AWS_SECRET_ACCESS_KEY} -e APPIUM=true budtmo/docker-android:genymotionThe deployed device(s) are automatically connected with adb inside docker container. Stopping the emulator will remove all deployed device(s) on Genymotion SaaS and user will be logged out at the end. As destroying all deployed ressources take time in AWS (it takes around 3 min), you need to specify the waiting time on docker stop
docker stop --time=180 android-container
