AWS Device Farm
Developer Guide (API Version 2015-06-23)

Step 4: Configuring Test Types

By default, the AWS Device Farm Gradle plugin runs the Instrumentation test. If you want to run your own tests or specify additional parameters, you can choose to configure a test type. This topic provides information about each available test type and what you need to do in Android Studio to configure it for use. For more information about the available test types in Device Farm, see Working with Test Types in AWS Device Farm.

If you haven't done so already, complete steps 1 – 3 before configuring test types.

Note

If you are using device slots, the device slots feature is disabled by default.

Appium

Device Farm provides support for Appium Java JUnit and TestNG for Android.

You can choose useTestNG() or useJUnit(). JUnit is the default and does not need to be explicitly specified.

appium { tests file("path to zip file") // required useTestNG() // or useJUnit() }

Built-in: Explorer

Device Farm provides a built-in app explorer to test user flows through your app without writing custom test scripts. You can specify a user name and password to test scenarios that require a login. Here is how you configure user name and password:

appexplorer { username "my-username" password "my-password" }

For more information, see Built-in: Explorer (Android).

Built-in: Fuzz

Device Farm provides a built-in fuzz test type, which randomly sends user interface events to devices and then reports the results.

fuzz { eventThrottle 50 // optional default eventCount 6000 // optional default randomizerSeed 1234 // optional default blank }

For more information, see Built-in: Fuzz (Android and iOS).

Calabash

Device Farm provides support for Calabash for Android. For information about how to prepare your Android Calabash tests, see Calabash.

calabash { tests file("path to zip file") // required tags "my tags" // optional calabash tags profile "my profile" // optional calabash profile }

Instrumentation

Device Farm provides support for instrumentation (JUnit, Espresso, Robotium, or any instrumentation-based tests) for Android. For more information, see Instrumentation.

When running an instrumentation test in Gradle, Device Farm uses the .apk file generated from your androidTest directory as the source of your tests.

instrumentation { filter "test filter per developer docs" // optional }

UI Automator

Upload your app and UI Automator-based tests in a .jar file.

uiautomator { tests file("path to uiautomator jar file") // required filter "test filter per developer docs" // optional }

For more information, see UI Automator.