Genymotion Cloud - the first Bitrise Verified Step

Learn how to integrate Genymotion Cloud Android Virtual Devices into your workflows and use the testing framework of your choice on Bitrise.

Learn how to integrate Genymotion Cloud Android Virtual Devices into your workflows and use the testing framework of your choice on Bitrise.

When it comes to testing mobile apps, especially in a highly Android dominant fragmented mobile market, it becomes challenging to perform quick and efficient tests. Mobile DevOps encourages the use of multiple mobile devices in the Cloud to tackle this challenge.

With Genymotion Cloud SaaS, QA engineers can spawn many Android virtual devices in the Cloud in parallel and test at scale. With Bitrise, a Continuous Integration & Delivery platform dedicated to mobile apps, users can use a powerful UI to create workflows easily, which then can build, test and deploy an app and improve efficiency by setting up the whole mobile application dev lifecycle environment.

Genymotion Cloud steps in a workflow
Genymotion Cloud steps in a workflow

Genymotion Cloud SaaS is now available on Bitrise, so QA engineers can now easily choose the Genymotion Cloud SaaS Android virtual devices to run their tests on them using any testing framework (Espresso, Appium and so on). No need to learn how to use the Genymotion Cloud command-line tool to automate the start/stop of the devices: everything can be handled in the UI.

In this article, we are going to cover Appium written tests but you can also use any other testing framework. You can also watch our webinar on-demand for further details and explanation on Bitrise’s YouTube channel.

1. Connect your Android project to Bitrise

Adding an application to Bitrise is really simple; please refer to the official documentation for details.

After having connected your Android application to, a workflow is created with several default Android steps. The following screenshot shows the default workflow:  


2. Build an Android application

In order to run Appium tests, you need to build your Android application. So let’s add the “Android build” step to your workflow. When this step is executed, the APK path is pushed to an environment variable ( $BITRISE_APK_PATH ) which we will use later when we run the tests.


3. Install and start an Appium server

We will use the Script step to install and start an Appium server.

As it is a Bash script, it allows you to start an Appium server with the needed capabilities, the arguments are described here.


Use this script:

#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x

#export JAVA_HOME
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin

npm install -g appium --unsafe-perm=true --allow-root

appium &>/dev/null &
Copy code

4. Add Genymotion Cloud Start Android Devices step

This step starts one or several devices on the Genymotion Cloud SaaS platform


This step has several required parameters:

  • Genymotion Cloud SaaS email (required): it is the email of your Genymotion Cloud SaaS account; if you don't have an account, please create it first on
  • Genymotion Cloud SaaS password (required): it is the password for your Genymotion Cloud SaaS account.
  • Recipe UUID (required): Recipe UUID is the identifier used when starting an instance, it can be retrieved using gmsaas recipes list command line
  • For example, if you want to start only one Android instance: e20da1a3-313c-434a-9d43-7268b12fee08
  • If you want to start several Android instances,  you must specify all recipe UUIDs separated by a comma, for example:
  • ADB serial port (optional):  it is the port through which the instance will be connected to ADB, for example: localhost:adb_serial_port.
  • If you do not specify any ADB serial ports, it will be generated randomly
  • If you specify ADB serial ports, you must specify as many ports as the number of specified recipe UUID(s). ADB serial ports are separated by a comma. For example: 4321,4322,4323

5. Run tests

In this tutorial, we use an Android application with Appium tests written in Python. Even if you use another language, the logic is the same.

Here, we will add another Script step which:

  • Installs all dependencies
  • Starts the command executing tests. As you can see in the following screenshot, we use the environment variable $BITRISE_APK_PATH which has been exported in the Android build step.

Use this script:

#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x

echo "# Install dependencies"
pip3 install -r appium/requirements.txt

# Execute tests through pytest
echo "# Execute tests"
pytest -n 2 appium/ --apk $BITRISE_APK_PATH
Copy code


6. Add Genymotion Cloud SaaS stop instances step

This step will stop all Genymotion Cloud SaaS instances started in the “start” step. This step will always run to make sure that no instances are left running in case a previous step fails the build.

No need to change the input variable “Instance UUID”, it is automatically exported in the “start” step.


7. Conclusion

At the end of this tutorial, you should be able to create a complete Continuous Integration workflow for your application, including unit and UI testing.

You can improve your workflow by adding other steps in order to deliver your application, but this is another story :) You can find more information here.

If you have any questions, feel free to contact us on our website, on Genymotion Cloud SaaS platform. To find more information, please visit our help center or read our documentation.

Genymotion Cloud SaaS steps are open-source, so feel free to create an issue or contribute and

Last but not least, enjoy your Bitrise CI/CD workflow with Genymotion Cloud SaaS!

Thanks for reading!
Thanks to the Bitrise team for all their help!

If you'd like to know more about our Verified Step Program and create your Verified Step, read more about it here.

The Mobile DevOps Newsletter

Explore more topics

App Development

Learn how to optimize your mobile app deployment processes for iOS, Android, Flutter, ReactNative, and more

Bitrise & Community

Check out the latest from Bitrise and the community. Learn about the upcoming mobile events, employee spotlights, women in tech, and more

Mobile App Releases

Learn how to release faster, better apps on the App Store, Google Play Store, Huawei AppGallery, and other app stores

Mobile DevOps

Learn Mobile DevOps best practices such as DevOps for iOS, Android, and industry-specific DevOps tips for mobile engineers

Mobile Testing & Security

Learn how to optimize mobile testing and security — from automated security checks to robust mobile testing and more.

Product Updates

Check out the latest product updates from Bitrise — Build Insights updates, product news, and more.

The Mobile DevOps Newsletter

Join 1000s of your peers. Sign up to receive Mobile DevOps tips, news, and best practice guides once every two weeks.