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. You 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, make sure you have completed the following requirements:

  • Complete the steps in Setting Up. You need an AWS account and an IAM user with permission to access Device Farm.

  • For Android, you need an .apk (Android app package) file. For iOS, you need an .ipa (iOS app archive) file. You upload the file 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.

  • (Optional) You need a test from one of the test types supported by Device Farm. You 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 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.

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

    
                        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. 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 Event count, Event throttle, and Randomizer seed 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.

  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 other 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 is 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 displays a calendar icon 
        Device Farm scheduled a job.
    . After the run starts, results appear as tests are completed. During this time, Device Farm displays a progress icon 
        Device Farm progress indicator.
    .

Step 4: View the Run's Results

The run is complete when the progress icon changes to a result icon. For more information, see Understanding Test Results.

To view the results, choose the completed run in the Device Farm console. A summary page displays:

  • 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 Working with Test Reports.

You have now completed this walkthrough.

Next Steps

For more information about Device Farm, see Concepts.