Managing Private Devices in AWS Device Farm - AWS Device Farm

Managing Private Devices in AWS Device Farm

A private device is a physical mobile device that AWS Device Farm deploys on your behalf in an Amazon data center. This device is exclusive to your AWS account.

Note

Currently, private devices are available in the AWS US West (Oregon) Region (us-west-2) only.

You can set up a fleet that contains one or more private devices. These devices are dedicated to your AWS account. After you set up the devices, you can optionally create one or more instance profiles for them. Instance profiles can help you automate test runs and consistently apply the same settings to device instances.

This topic explains how to create an instance profile and perform other common device management tasks.

Creating an Instance Profile

To control the behavior of private devices during a test run or remote access session, you can create or modify an instance profile in Device Farm. You do not need an instance profile to start using your private devices.

  1. Open the Device Farm console at https://console.aws.amazon.com/devicefarm/.

  2. Choose Device Farm settings.

  3. Choose Instance profiles.

  4. Choose Create a new instance profile.

  5. Enter a name for the instance profile.

    
                        Settings for an instance profile
  6. (Optional) Enter a description for the instance profile.

  7. (Optional) Change any of the following settings to specify which actions you want Device Farm to take on a device after each test run or session ends:

    • Reboot after Use – To reboot the device, select this check box. By default, this check box is cleared (false).

    • Package Cleanup – To remove all the app packages that you installed on the device, select this check box. By default, this check box is cleared (false). To keep all the app packages that you installed on the device, leave this check box cleared.

    • Exclude Packages from Cleanup – To keep only selected app packages on the device, select the Package Cleanup check box, and then choose Add new. For the package name, enter the fully qualified name of the app package that you want to keep on the device (for example, com.test.example). To keep more app packages on the device, choose Add new, and then enter the fully qualified name of each package.

Managing a Private Device Instance

If you already have one or more private devices in your fleet, you can view information about and manage certain settings for each device instance. You can also request an additional private device instance.

  1. Open the Device Farm console at https://console.aws.amazon.com/devicefarm/.

  2. Choose Device Farm settings.

  3. Choose Device instances. The Device instances tab displays a table of the private devices that are in your fleet. To quickly search or filter the table, enter search terms in the fields above the columns.

  4. (Optional) To request a new private device instance, choose Request a new device instance or contact us. Private devices require additional setup with help from the Device Farm team.

  5. In the table of device instances, choose the instance that you want to view information about or manage.

    
                        Settings for a device instance
  6. (Optional) For Profile, choose an instance profile to attach to the device instance. This can be helpful if you want to always exclude a specific app package from cleanup tasks, for example.

  7. (Optional) Under Labels, choose Add new to add a label to the device instance. Labels can help you categorize your devices and find specific devices more easily.

  8. Choose Save device instance.

Creating a Test Run or Starting a Remote Access Session

After you set up a private device fleet, you can create test runs or start remote access sessions with one or more private devices in your fleet.

  1. Open the Device Farm console at https://console.aws.amazon.com/devicefarm/.

  2. From the Device Farm console main page, choose Mobile Device Testing Projects and create or choose an existing project. To create a new project, choose Create a new project, enter a name for the project, and then choose Create project.

  3. Do one of the following:

    • To create a test run, choose Automated tests, and then choose Create a new run. The wizard guides you through the steps to create the run. For the Select devices step, you can edit an existing device pool or create a new device pool that includes only those private devices that the Device Farm team set up and associated with your AWS account. For more information, see Creating a Private Device Pool.

    • To start a remote access session, choose Remote access, and then choose Start a new session. On the Choose a device page, select Private device instances only to limit the list to only those private devices that the Device Farm team set up and associated with your AWS account. Then, choose the device that you want to access, enter a name for the remote access session, and choose Confirm and start session.

      
                                Private instances in a remote access session

Creating a Private Device Pool

When you create a test run, you can create a device pool for the test run and ensure that the pool includes only your private devices.

  1. Open the Device Farm console at https://console.aws.amazon.com/devicefarm/.

  2. From the Device Farm console main page, choose Mobile Device Testing Projects and create or choose an existing project. To create a new project, choose Create a new project, enter a name for the project, and then choose Create project.

  3. Choose Automated tests, and then choose Create a new run. The wizard guides you through the steps to choose your application and configure the test that you want to run.

  4. For the Select devices step, choose Create a new device pool, and enter a name and optional description for your device pool.

  5. Next to Select devices, select Private Device Instances Only to limit the list of devices to only those private devices that the Device Farm team set up and associated with your AWS account.

    
                        Create a device pool that contains only private devices
  6. Select each device that you want to include in the test run.

  7. (Optional) To create a device pool that changes dynamically as new devices become available, choose Add rule, and then set the values for Field, Operator, and Operand according to your requirements.

    
                        Add rules to choose private device instances

    Device Farm selects all device instances where the rule criteria is true.

  8. Choose Save device pool.

Next Steps

After you set up your private devices, you can also manage your private devices in the following ways:

To delete an instance profile, use the Account settings or Project settings page on the Device Farm console.