Automating Mobile App Testing with AWS Device Farm - Real Device Testing and CI/CD Integration
Run automated tests on real iOS and Android devices and integrate them into your CI/CD pipeline. This article covers test framework selection criteria and manual testing via remote access.
Overview of Device Farm and Mobile Testing Challenges
Quality assurance for mobile applications faces a fundamental challenge: device diversity. The combinations of Android and iOS versions, screen sizes, and hardware specifications reach thousands of patterns, making manual testing impractical. Building an on-premises device lab requires significant investment in device procurement, management, OS update application, and network environment setup. Device Farm is a service that lets you test mobile and web applications on real devices hosted by AWS. According to AWS, more than 2,500 devices are available (as of October 2026), including Samsung Galaxy, Google Pixel, iPhone, and iPad, covering multiple OS generations. The service offers two modes: automated testing (running test scripts) and remote access (manually operating a real device), allowing development teams to focus on test design and quality improvement.
Test Frameworks and Device Pool Management
Device Farm supports Appium and Instrumentation (such as Espresso) for Android; Appium, XCTest, and XCTest UI for iOS; and Appium for web applications. For cross-platform testing, Appium is the best choice because you can test both iOS and Android with the same test code. The built-in test suite runs basic tests without writing any test code. Fuzz testing generates random user actions to detect crashes. Device pools group target devices by OS version, screen size, manufacturer, and other criteria. The top devices pool feature automatically selects devices with the highest market share. Test results include logs, screenshots, and videos, which help reproduce issues and identify root causes. The following is an example of scheduling a test run with the AWS CLI:
aws devicefarm schedule-run \
--project-arn arn:aws:devicefarm:us-west-2:123456789012:project:EXAMPLE \
--app-arn arn:aws:devicefarm:us-west-2:123456789012:upload:EXAMPLE \
--device-pool-arn arn:aws:devicefarm:us-west-2:123456789012:devicepool:EXAMPLE \
--test type=APPIUM_JAVA_JUNIT,testPackageArn=arn:aws:devicefarm:...CI/CD Pipeline Integration
By adding a Device Farm action to the test stage of CodePipeline, you can automatically run device tests after each build. When a test fails, the pipeline stops, preventing buggy builds from being deployed to production. You can also create Device Farm test runs from Jenkins or GitHub Actions via the AWS CLI or SDK. Integration with Amplify build pipelines allows automatic Device Farm testing after successful builds. Testing on every device is time-consuming and costly, so a practical strategy is to prioritize devices with the highest market share and vary the number of target devices between full pre-release tests and daily smoke tests. The remote access feature lets you connect to real cloud devices in real time for manual exploratory testing and debugging.
Performance Testing and Network Simulation
The network simulation feature lets you test application behavior under various network conditions including 3G, 4G, Wi-Fi, low bandwidth, and high latency. For applications targeting emerging markets, verifying behavior under slow network conditions is essential for quality assurance. GPS simulation enables testing of location-based applications at any coordinates worldwide.
Test Result Management and Quality Monitoring
Screenshots, video recordings, and log output during test execution are automatically saved to an S3 bucket managed by the service. Test results are accessible directly from the CodePipeline console, with detailed information on failed test cases, screenshots, and device logs. Parallel test execution across many real devices lets you complete device compatibility verification in less time than manual testing.
Device Farm Pricing
Device Farm offers two pricing models. Pay-per-use charges approximately $0.17 per minute per device (as of October 2026). The flat-rate plan costs $250 per month per device slot (one device at a time) for unlimited use, separately for automated testing and remote access and for Android and iOS, with multi-device flat-rate plans also available. If you run tests daily through a CI/CD pipeline, the flat-rate plan becomes more cost-effective once your monthly test time exceeds about 25 hours. Remote access (manual testing) costs approximately $0.17 per minute. A one-time free trial is available for first-time users. While building an on-premises device lab requires a substantial initial investment, Device Farm enables you to build a test infrastructure with zero upfront costs.
Summary
Device Farm is a service that automates mobile app testing on real devices. You can run automated tests with major test frameworks across many devices without purchasing or managing them. By integrating Device Farm into your CI/CD pipeline, you can detect device-specific bugs early and release high-quality mobile applications. Network simulation enables testing under conditions close to what users actually experience, helping reduce post-release defects.
References (Official AWS Resources)
The primary sources for this page are the official AWS website and documentation. Check the official pages below for the latest specifications and pricing.
If this page and the official documentation disagree, treat the official documentation as authoritative.