

# AWS Device Farm concepts
<a name="concepts"></a>

Device Farm is an app testing service that you can use to test and interact with your Android, iOS, and web apps on real, physical phones and tablets that are hosted by Amazon Web Services (AWS).

This section describes important Device Farm concepts.
+ [Device support in AWS Device FarmDevices](devices.md)
+ [Test environments in AWS Device Farm](test-environments.md)
+ [Runs](test-runs.md)
+ [Apps](apps.md)
+ [Reports in AWS Device FarmReports](reports.md)
+ [Sessions](sessions.md)

For more information about supported test types in Device Farm, see [Test frameworks and built-in tests in AWS Device Farm](test-types.md).

# Device support in AWS Device Farm
<a name="devices"></a>

The following sections provide information about device support in Device Farm.

**Topics**
+ [

## Supported devices
](#devices-supported)
+ [

## Device pools
](#devices-pools)
+ [

## Private devices
](#devices-private)
+ [

## Device branding
](#devices-branding)
+ [

## Device slots
](#device-slots)
+ [

## Preinstalled device apps
](#devices-apps)
+ [

## Device capabilities
](#devices-capabilities)

## Supported devices
<a name="devices-supported"></a>

Device Farm provides support for hundreds of unique, popular Android and iOS devices and operating system combinations. The list of available devices grows as new devices enter the market. For the full list of devices, see the [interactive device list in your AWS console](https://us-west-2.console.aws.amazon.com/devicefarm/home?region=us-west-2#/mobile/publicdevices).

## Device pools
<a name="devices-pools"></a>

Device Farm organizes its devices into device pools that you can use for your testing. These device pools contain related devices, such as devices that run only on Android or only on iOS. Device Farm provides curated device pools, such as those for top devices. You can also create device pools that mix public and private devices.

## Private devices
<a name="devices-private"></a>

Private devices allow you to specify exact hardware and software configurations for your testing needs. Certain configurations, such as rooted Android devices, can be supported as private devices. Each private device is a physical device that Device Farm deploys on your behalf in an Amazon data center. Your private devices are available exclusively to you for both automated and manual testing. After you choose to end your subscription, the hardware is removed from our environment. For more information, see [Private Devices](https://aws.amazon.com/device-farm/pricing/#privateDevices) and [Private devices in AWS Device Farm](working-with-private-devices.md).

## Device branding
<a name="devices-branding"></a>

Device Farm runs tests on physical mobile and tablet devices from a variety of OEMs.

## Device slots
<a name="device-slots"></a>

Device slots correspond to concurrency in which the number of device slots you have purchased determines how many devices you can run in tests or remote access sessions. 

There are two types of device slots:
+ A *remote access device slot* is one you can run in remote access sessions concurrently.

  If you have one remote access device slot, you can only run one remote access session at a time. If you purchase additional remote testing device slots, you can run multiple sessions concurrently.
+ An *automated testing device slot* is one on which you can run tests concurrently.

  If you have one automated testing device slot, you can only run tests on one device at a time. If you purchase additional automated testing device slots, you can run multiple tests concurrently, on multiple devices, to get test results faster.

 You can purchase device slots based on the device family (Android or iOS devices for automated testing and Android or iOS devices for remote access). For more information, see [Device Farm Pricing](https://aws.amazon.com/device-farm/pricing/).

## Preinstalled device apps
<a name="devices-apps"></a>

Devices in Device Farm include a small number of apps that are already installed by manufacturers and carriers.

## Device capabilities
<a name="devices-capabilities"></a>

All devices have internet connectivity. They do not have carrier connections and cannot make phone calls or send SMS messages.

You can take photos with any device that supports a front- or rear-facing camera. Due to the way the devices are mounted, photos might look dark and blurry.

Google Play Services and Google Chrome are installed on Android devices.

# Test environments in AWS Device Farm
<a name="test-environments"></a>

AWS Device Farm provides both custom and standard test environments for running your automated tests. You can choose a custom test environment for complete control over your automated tests. Or, you can choose the Device Farm default standard test environment, which offers granular reporting of each test in your automated test suite.

**Topics**
+ [

## Standard test environment
](#test-environments-standard)
+ [

## Custom test environment
](#custom-test-environment)

## Standard test environment
<a name="test-environments-standard"></a>

 When you run a test in the standard environment, Device Farm provides detailed logs and reporting for every case in your test suite. You can view performance data, videos, screenshots, and logs for each test to pinpoint and fix issues in your app.

**Note**  
Because Device Farm provides granular reporting in the standard environment, test execution times can be longer than when you run your tests locally. If you want faster execution times, run your tests in a custom test environment. 

## Custom test environment
<a name="custom-test-environment"></a>

When you customize the test environment, you can specify the commands Device Farm should run to execute your tests. This ensures that tests on Device Farm run in a way that is similar to tests run on your local machine. Running your tests in this mode also enables live log and video streaming of your tests. When you run tests in a customized test environment, you do not get granular reports for each test case. For more information, see [Custom test environments in AWS Device Farm](custom-test-environments.md).

You have the option to use a custom test environment when you use the Device Farm console, AWS CLI, or Device Farm API to create a test run.

For more information, see [Uploading a Custom Test Spec Using the AWS CLI](https://docs.aws.amazon.com/devicefarm/latest/developerguide/how-to-create-test-run.html#how-to-create-test-run-cli-step5) and [Creating a test run in Device Farm](how-to-create-test-run.md).

# Runs in AWS Device Farm
<a name="test-runs"></a>

The following sections contain information about runs in Device Farm.

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.

**Topics**
+ [

## Run configuration
](#test-runs-configuration)
+ [

## Run files retention
](#test-runs-retention)
+ [

## Run device state
](#test-runs-device-state)
+ [

## Parallel runs
](#test-runs-parallel)
+ [

## Setting the execution timeout
](#test-runs-default-timeout)
+ [

## Ads in runs
](#test-runs-ads)
+ [

## Media in runs
](#test-runs-media)
+ [

## Common tasks for runs
](#test-runs-tasks)

## Run configuration
<a name="test-runs-configuration"></a>

As part of a run, you can supply settings Device Farm can use to override current device settings. These include latitude and longitude coordinates, extra data (contained in a .zip file), and auxiliary apps (apps that should be installed before the app to be tested). On Android, some additional settings can be changed, such as locale and radio states (Bluetooth, GPS, NFC, and Wi-Fi).

## Run files retention
<a name="test-runs-retention"></a>

Device Farm stores your apps and files for 30 days and then deletes them from its system. You can delete your files at any time, however.

Device Farm stores your run results, logs, and screenshots for 400 days and then deletes them from its system.

## Run device state
<a name="test-runs-device-state"></a>

Device Farm always reboots a device before making it available for the next job.

## Parallel runs
<a name="test-runs-parallel"></a>

Device Farm runs tests in parallel as devices become available.

## Setting the execution timeout
<a name="test-runs-default-timeout"></a>

You can set a value for how long a test run should execute before you stop each device from running a test. For example, if your tests take 20 minutes per device to complete, you should choose a timeout of 30 minutes per device.

For more information, see [Setting the execution timeout for test runs in AWS Device Farm](how-to-set-default-timeout-for-test-runs.md).

## Ads in runs
<a name="test-runs-ads"></a>

We recommend that you remove ads from your apps before you upload them to Device Farm. We cannot guarantee that ads are displayed during runs.

## Media in runs
<a name="test-runs-media"></a>

You can provide media or other data to accompany your app. Additional data must be provided in a .zip file no more than 4 GB in size.

## Common tasks for runs
<a name="test-runs-tasks"></a>

For more information, see [Creating a test run in Device Farm](how-to-create-test-run.md) and [Test runs in AWS Device FarmTest runs](runs.md).

# Apps in AWS Device Farm
<a name="apps"></a>

The following sections contain information about app behaviors in Device Farm.

**Topics**
+ [

## Instrumenting apps
](#test-runs-instrumenting)
+ [

## Re-signing apps in runs
](#test-runs-app-resigning)
+ [

## Obfuscated apps in runs
](#test-runs-obfuscated-apps)

## Instrumenting apps
<a name="test-runs-instrumenting"></a>

You do not need to instrument your apps or provide Device Farm with the source code for your apps. Android apps can be submitted unmodified. iOS apps must be built with the **iOS Device** target instead of with the simulator.

## Re-signing apps in runs
<a name="test-runs-app-resigning"></a>

For iOS apps, you do not need to add any Device Farm UUIDs to your provisioning profile. Device Farm replaces the embedded provisioning profile with a wildcard profile and then re-signs the app. If you provide auxiliary data, Device Farm adds it to the app's package before Device Farm installs it, so that the auxiliary exists in your app's sandbox. Re-signing the app removes entitlements such as App Group, Associated Domains, Game Center, HealthKit, HomeKit, Wireless Accessory Configuration, In-App Purchase, Inter-App Audio, Apple Pay, Push Notifications, and VPN Configuration & Control.

For Android apps, Device Farm re-signs the app. This might break any functionality that depends on the app's signature, such as the Google Maps Android API, or it might trigger antipiracy or antitamper detection from products such as DexGuard. 

## Obfuscated apps in runs
<a name="test-runs-obfuscated-apps"></a>

For Android apps, if the app is obfuscated, you can still test it with Device Farm if you use ProGuard. However, if you use DexGuard with antipiracy measures, Device Farm cannot re-sign and run tests against the app.

# Reports in AWS Device Farm
<a name="reports"></a>

The following sections provide information about Device Farm test reports.

**Topics**
+ [

## Report retention
](#reports-retention)
+ [

## Report components
](#reports-components)
+ [

## Logs in reports
](#reports-logs)
+ [

## Common tasks for reports
](#reports-tasks)

## Report retention
<a name="reports-retention"></a>

Device Farm stores your reports for 400 days. These reports include metadata, logs, screenshots, and performance data.

## Report components
<a name="reports-components"></a>

Reports in Device Farm contain pass and fail information, crash reports, test and device logs, screenshots, and performance data.

Reports include detailed per-device data and high-level results, such as the number of occurrences of a given problem.

## Logs in reports
<a name="reports-logs"></a>

Reports include complete logcat captures for Android tests and complete Device Console logs for iOS tests.

## Common tasks for reports
<a name="reports-tasks"></a>

For more information, see [Viewing test reports in Device Farm](how-to-use-reports.md).

# Sessions in AWS Device Farm
<a name="sessions"></a>

You can use Device Farm to perform interactive testing of Android and iOS apps through remote access sessions. This includes both manual interaction in a web browser and running Appium tests from a local client against the remote device. Developers can reproduce issues with their app or with their Appium tests on a specific device to isolate and resolve problems.

**Topics**
+ [

## Supported devices for remote access
](#session-devices-supported)
+ [

## Session files retention
](#session-files-retention)
+ [

## Instrumenting apps
](#session-instrumenting)
+ [

## Re-signing apps in sessions
](#session-resigning-apps)
+ [

## Obfuscated apps in sessions
](#session-obfuscated-apps)

## Supported devices for remote access
<a name="session-devices-supported"></a>

Device Farm provides support for a number of unique, popular Android and iOS devices. The list of available devices grows as new devices enter the market. The Device Farm console displays the current list of Android and iOS devices available for remote access. For more information, see [Device support in AWS Device FarmDevices](devices.md).

## Session files retention
<a name="session-files-retention"></a>

Device Farm stores your apps and files for 30 days and then deletes them from its system. You can delete your files at any time, however.

Device Farm stores your session logs and captured video for 400 days and then deletes them from its system.

## Instrumenting apps
<a name="session-instrumenting"></a>

You do not need to instrument your apps or provide Device Farm with the source code for your apps. Android and iOS apps can be submitted unmodified. 

## Re-signing apps in sessions
<a name="session-resigning-apps"></a>

Device Farm re-signs Android and iOS apps. This can break functionality that depends on the app's signature. For example, the Google Maps API for Android depends on your app's signature. App re-signing can also trigger antipiracy or antitamper detection from products such as DexGuard for Android devices. 

## Obfuscated apps in sessions
<a name="session-obfuscated-apps"></a>

For Android apps, if the app is obfuscated, you can still test it with Device Farm if you use ProGuard. However, if you use DexGuard with antipiracy measures, Device Farm cannot re-sign the app. 