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

Create a Run in AWS Device Farm

To create a run, you can use the Device Farm console, the AWS CLI, or the Device Farm API.

For information about runs, see Runs.

Prerequisites

  • Create a project in Device Farm. Follow the instructions in Create a Project, and then return to this page.

Create a Test Run with the Device Farm Console

  1. Sign in to the Device Farm console at https://console.aws.amazon.com/devicefarm.

  2. If you see the AWS Device Farm console home page, type a name for your project. and choose Create project. Refresh the page to see your new project.

  3. If you already have a project, you can upload your tests to an existing project.

    Otherwise, choose Create a new project and specify a name to create your project.

  4. Open your project, and then choose Create a new run.

  5. On the Choose your application page, choose either Native application (the Android and Apple button) or Web application (the HTML5 button).

  6. Upload your application file. You can also drag and drop your file or choose a recent upload.

    If you are uploading an iOS app, be sure to build for iOS device, as opposed to a simulator.

  7. Optionally, you can provide a Run name.

    If you don't specify a Run name, Device Farm uses the app filename as the run name.

  8. Choose Next step.

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

    Note

    If you do not have any tests available, then choose Built-in: Fuzz to run a standard test suite that is built-in to Device Farm. If you choose Built-in: Fuzz, and the Event count, Event throttle, and Randomizer seed boxes appear, you can change or leave the values as desired.

    For information about the available test suites, see Working with Test Types in AWS Device Farm.

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

  11. Choose Next step.

  12. On the Select devices page, do one of the following:

    • To choose a built-in device pool to run the tests against, for Device pool, choose Top Devices or All Devices.

    • To create your own device pool to run the tests against, follow the instructions in Create a Device Pool, and then return to this page.

    • If you created your own device pool earlier, for Device pool, choose your device pool.

    For more information, see Devices.

  13. Choose Next step.

  14. On the Specify device state page, do none, some, or all of the following:

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

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

    • 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.

  15. Choose Review and start run.

  16. On this page, you can specify the execution timeout for your test run.

  17. Change the execution timeout by typing a value or using the slider bar. For more information, see Set the Execution Timeout for Test Runs in AWS Device Farm.

  18. Choose Confirm and start run.

Device Farm will 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.

Note

If you need to stop the test run, see Stop a Run in AWS Device Farm.

Create a Run with the AWS CLI

For a tutorial on using the AWS CLI to create a test run, see this AWS Mobile blog post.

  1. Make sure that you have created a project. For more information, see Create a Project with the AWS CLI.

  2. Upload your application file by running the create-upload command.

  3. Upload your tests by running the create-upload command.

  4. Make sure that you have created a device pool. For more information, see Create a Device Pool with the AWS CLI.

  5. Schedule a test run by running the schedule-run command.

Note

For information about using Device Farm with the AWS CLI, see AWS CLI Reference.

Create a Run with the Device Farm API

  1. Make sure that you have created a project. For more information, see Create a Project with the Device Farm APICreate a Device Pool with the Device Farm API.

  2. Call the ScheduleRun API.

For information about using the Device Farm API, see API Reference.

Next Steps

You'll know the run is complete when the progress icon changes to a result icon. A report corresponding to the run will appear as soon as tests are complete. For more information, see Reports.

To use the report, follow the instructions in Analyze a Report.