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

Getting Started with AWS Device Farm

This walkthrough shows you how to use Device Farm to test an Android or iOS app. In this walkthrough, you will use the Device Farm console to create a project, upload an .apk or .ipa file, run a suite of standard tests, and then view the results.

Prerequisites

Before you begin this walkthrough, make sure you have completed the following requirements:

  • Complete the steps in Setting Up, which include signing up for an AWS account, creating or using an IAM user in the AWS account, and giving the IAM user permission to access Device Farm.

  • For Android, you will need an .apk (Android app package) file, and for iOS you will need an .ipa (iOS app archive) file, which you will upload to Device Farm later in this walkthrough.

    Note

    Make sure that your .ipa file is built for an iOS device and not for a simulator.

  • Optionally, you will need a test from one of the test types supported by Device Farm. You will upload this test package to Device Farm, and then run the test later in this walkthrough. (If you do not have a test package available, you can specify and run a standard built-in test suite.) For more information, see Working with Test Types in AWS Device Farm.

Step 1: Sign in to the Console

You can use the Device Farm console to create and manage projects and runs for testing. You will learn about projects and runs later in this walkthrough.

Step 2: Create a Project

To test an app in Device Farm, you must first create a project.

A project in Device Farm represents a logical workspace in Device Farm that contains runs, one run for each test of a single app against one or more devices. Projects enable you to organize workspaces in whatever way you choose. For example, there can be one project per app title, or there can be one project per platform. You can create as many projects as you need.

  1. In the Device Farm console page, type a name for your project (for example, MyDemoProject).

    Note

    If you type a project name other than MyDemoProject, be sure to use it throughout this walkthrough.

    
                                Packages page in the Device Farm console

  2. Choose Create project. Refresh the page to see your new project.

Step 3: Create and Start a Run

Now that you have a project, you can create and then start a run.

A run in Device Farm represents a specific build of your app, with a specific set of tests, to be run on a specific set of devices. A run produces a report that contains information about the results of the run. A run contains one or more jobs. For more information, see Runs.

  1. Choose MyDemoProject.

  2. On the Automated tests page, choose Create a new run.

  3. On the Choose your application page, choose Upload.

  4. Browse to and choose your Android or iOS app file. For Android, the file must be an .apk file. For iOS, the file must be an .ipa file built for a device, not the simulator.

  5. Choose Next step.

  6. On the Configure a test page, choose one of the test suites.

    Note

    If you do not have any tests available, choose Built-in: Fuzz to run a standard built-in test suite. For this walkthrough, if you choose Built-in: Fuzz, leave the Event count, Event throttle, and Randomizer seed boxes at their default values.

  7. If you did not choose Built-in: Fuzz, then choose Upload, and browse to and choose the file that contains your tests.

  8. Choose Next step.

  9. On the Select devices page, for Device pool, choose Top Devices to select the device pool, and then choose Next step.

    A device pool in Device Farm represents a collection of devices that typically share similar characteristics such as platform, manufacturer, or model. For more information, see Devices.

  10. On the Specify device state page, do any of the following:

    • To provide additional data for Device Farm to use during the run, next to Add extra data, choose Upload, and then browse to and choose the .zip file.

    • To install an additional app for Device Farm to use during the run, next to Install other apps, choose Upload, and then browse to and choose the .apk or .ipa file that contains the app. Repeat for any additional apps you want to install. You can change the installation order by dragging and dropping the apps.

    • To specify whether Wi-Fi, Bluetooth, GPS, or NFC will be enabled during the run, next to Set radio states, select the appropriate boxes.

    • To preset the device latitude and longitude for the run, next to Device location, type the coordinates.

    • To preset the device locale for the run, choose the locale in Device Locale.

    • To preset the network profile for the run, choose a profile in Network profile or choose Create a new profile to create your own.

  11. Choose Next step.

  12. On the Review and start run page, choose Confirm and start run.

Device Farm should start the run as soon as devices are available, typically within a few minutes. Until the run starts, Device Farm will display a calendar icon. After the run starts, results will appear as tests are completed. During this time, Device Farm will display a progress icon.

Step 4: View the Run's Results

You'll know the run is complete when the progress icon changes to a result icon.

To view the run's results, choose the completed run in the Device Farm console. A summary page that includes the following information is displayed.

  • The total number of tests, by outcome.

  • Lists of tests with unique warnings or failures.

  • A list of devices and test results for each.

  • Any screenshots captured during the run, grouped by device.

For more information, see Analyze a Report.

You have now completed this walkthrough.

Next Steps

To learn more about Device Farm, see Concepts.