Automation Features

With gmsaas CLI tool, you can use Genymotion SaaS to run automated tests in your continuous integration pipeline. The setup works regardless of your framework or continuous integration server. The gmsaas CLI tool is a command line tool that manages the lifecycle of your virtual devices. The tool also interacts between your environment and your instance via ADB.

Prerequisite

Create an API Token

Create an API Token.

Install and setup gmsaas command line tool

Install and setup gmsaas command line tool.

Authenticate gmsaas with an API token

Authenticate gmsaas with an API token.

gmsaas auth token <token>

Test Automation Frameworks

Instrumented tests

The Genymotion Java API is provided for instrumented tests.

Gradle

1. Create and start your instance by running:

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>. > Tip: 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 with ./gradlew connectedAndroidTest.

You can view your tests running in the virtual device by signing in to Genymotion SaaS.

4. Once your tests have run, stop the virtual devices using:

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.

The Genymotion Java API is no longer maintained.

You can use the Genymotion Java API in order to automate the modification of sensor values such as battery, GPS, ID, SMS, calls... For more information on the implementation of the Genymotion Java API, please refer to the official documentation.

A sample project is available here.

Other Frameworks

We are also compatible with the following frameworks:

Continuous Integration Servers

And many more

For a complete list of available integrations, feel free to have a look at our website. Or visit our website Tutorial section for more tutorials.