Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.
Eliot Lash edited this page Jun 21, 2017 · 5 revisions

Setup instructions

  1. This step requires an Amazon Device Farm registration. Please take some time to read through the device farm documentation to familiarize yourself with its concepts and run through basic setup.
  2. Make sure you have an AWS account enrolled in device farm (and preferably an IAM user with necessary permissions). See "Setting Up AWS Device Farm" for more info.
  3. Set up a project and device pool to use for test runs. See "Getting Started with AWS Device Farm" for more info.
    • At this point I would recommend setting up a test run manually through the AWS console to make sure your project, device pool, and test package are all configured correctly. Once you've seen your test run pass you can safely move on to setting up automated test runs in bitrise.
  4. Due to constraints of our company's workflow, this step currently requires the test package to already be uploaded to device farm before this step begins. For testing purposes, you can do this manually through the AWS console. For your final bitrise workflow, you should use the aws-device-farm-file-deploy step to upload the latest test package before kicking off a test run.
    • ⚠️ test_package_name should correspond to the base file name (not the full path) of the previously uploaded test package. The runner will use the most recently uploaded test package with this name.
  5. Look through the descriptions for the other required inputs for this step. They should all have information and documentation references on where to obtain them.
    • To obtain certain information such as the ARN identifiers for various entities I recommend installing the AWS Command Line Interface. Please see their documentation for setup and usage instructions.
  6. Decide if you will be testing on iOS, Android, or both. Select the appropriate option for the Platform input and complete the additional required inputs (IPA/APK path, etc.) based on your platform selection.
  7. Decide if you want your build to wait for the test run to complete. If you choose to wait, the step will fail if the test run fails, though this may significantly increase your build time. Also (for now, anyway) if you enable waiting for results and are testing on Android and iOS, the Android run will not be started until the iOS run is finished. If you don't wait, both runs will be started in parallel and the step will finish if the runs are started successfully.

Required Permissions

The AWS user needs to have these permissions to operate correctly:

  • devicefarm:CreateUpload
  • devicefarm:GetUpload
  • devicefarm:GetRun
  • devicefarm:GetUpload
  • devicefarm:ListUploads
  • devicefarm:ScheduleRun

Contributing

I welcome improvements to this step and its documentation. However, please keep in mind that I cannot take any PRs that break our workflow, so please make sure changes you make are backwards-compatible with the existing two-step workflow.

By contributing, you agree to release your code under the MIT license.

Clone this wiki locally