AWS Device Farm

A cloud testing service for running application tests on real mobile devices and browsers

Overview

AWS Device Farm is a cloud testing service that lets you run automated and manual tests on real smartphones, tablets, and desktop browsers hosted by AWS. Because it uses physical devices rather than emulators, it detects crashes, performance degradation, and UI rendering issues under conditions close to actual user environments. It supports Android, iOS, and web applications, with compatibility for major test frameworks including Appium, Espresso, XCTest, and Calabash. Test results include screenshots, video recordings, logs, and performance data, streamlining issue reproduction and root cause identification.

Device Pools and Test Execution Mechanics

Test execution in Device Farm begins with configuring a device pool. A device pool defines the set of physical devices to test against, filtered by criteria such as OS version, manufacturer, and screen size. For example, you might configure pools like "Samsung devices running Android 12 or later" or "iPhones running iOS 16 or later" to replicate your target users' actual environments. When you create a test run, the uploaded app binary (.apk / .ipa) and test package are distributed to each device in the pool and executed in parallel. Tests on each device run in isolated environments with no residual data from previous runs. During execution, you can monitor status in real time, and upon completion, per-device screenshots, video recordings, logcat/syslog output, and CPU/memory performance data are generated. The pricing model offers two options: per-device-minute pay-as-you-go and a monthly flat-rate unlimited plan, chosen based on testing frequency.

Automated Test Frameworks and Test Suites

Device Farm natively supports multiple automated test frameworks. For Android, it supports Appium (Java / Python / Node.js), Espresso, Calabash, and UI Automator. For iOS, Appium, XCTest (XCUITest), and Calabash are available. Web application testing uses Selenium WebDriver, running on Chrome and Firefox desktop browsers. Test suite configuration allows defining pre- and post-test hook processing through a test spec file (testspec.yml). You can customize dependency installation, environment variable setup, pre-test data seeding, and post-test artifact collection. The built-in fuzz test feature lets you detect crashes through random UI interactions without writing any test code. Test results are aggregated at the suite and test case level, with failed test screenshots and logs enabling rapid identification of problem areas.

CI/CD Integration and Test Result Analysis

Integrating Device Farm into your CI/CD pipeline enables automatic real-device testing with every code change. For AWS CodePipeline integration, a native action provider is available - simply add Device Farm as a test stage after the build stage. For third-party CI tools like Jenkins, GitHub Actions, and Bitrise, call the Device Farm API via AWS CLI or AWS SDK. For test result analysis, downloading screenshots, video, and logs in bulk via the Artifacts API and feeding them into an internal test reporting system is a practical workflow. Tracking time-series trends of performance data (CPU, memory, network, FPS) lets you detect performance regressions across releases. Exporting test results to S3 and running aggregate analysis with Athena to visualize failure trends by device and OS version is also an effective operational practice.

共有するXB!