This Plugin Allows XCUITests and android Instrumentation tests run on AWS device Farm
| iOS | Android | Fail |
|---|---|---|
![]() |
![]() |
![]() |
fastlane add_plugin aws_device_farm
Open your AWS dashboard and under AWS-Device Farm - configure your Device Pools.
Select the devices you want to run the tests on.
in this example we called this fastlane
lane :aws_device_run_ios do
ENV['AWS_ACCESS_KEY_ID'] = 'xxxxx'
ENV['AWS_SECRET_ACCESS_KEY'] = 'xxxxx'
ENV['AWS_REGION'] = 'us-west-2'
#Build For Testing
xcodebuild(
scheme: 'UITests',
destination: 'generic/platform=iOS',
configuration: 'Release',
derivedDataPath: 'aws',
xcargs: "GCC_PREPROCESSOR_DEFINITIONS='AWS_UI_TEST' ENABLE_BITCODE=NO CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO build-for-testing"
)
# Transform .app into AWS compatible IPA
aws_device_farm_package(
derrived_data_path: "aws",
configuration: "Release"
)
# RUN tests on AWS Device Farm
aws_device_farm
endlane :aws_device_run_android do
ENV['AWS_ACCESS_KEY_ID'] = 'xxxxx'
ENV['AWS_SECRET_ACCESS_KEY'] = 'xxxxx'
ENV['AWS_REGION'] = 'us-west-2'
#Build Debug App + Instrumentation Apk
gradle(task: 'assembleDebug')
gradle(task: 'assembleAndroidTest')
# RUN tests on AWS Device Farm
aws_device_farm(
binary_path: 'app/build/outputs/apk/app-debug.apk',
test_binary_path: 'app/build/outputs/apk/app-debug-androidTest-unaligned.apk'
)
end- aws_device_farm
| Option | Default | Description | Type |
|---|---|---|---|
| name | fastlane | AWS Device Farm Project Name | String |
| binary_path | Path to App Binary | String | |
| test_binary_path | Path to App Binary | String | |
| device_pool | IOS | AWS Device Farm Device Pool | String |
| wait_for_completion | true | Wait for Test-Run to be completed | Boolean |
| allow_device_errors | false | Do you want to allow device booting errors? | Boolean |
- aws_device_farm_package
| Option | Default | Description | Type |
|---|---|---|---|
| derrived_data_path | Derrived Data Path, containing a build-for-testing derrived-data folder |
String | |
| derrived_data_path | Development | Specify the Build-Configuration that was used e.g.: Development | String |
it is based on a custom action by @icapps (https://github.com/icapps/fastlane-configuration) added the following:
- iOS Support for XCUITests
- support current
fastlaneversion - improve output
- make it available as a
fastlaneplugin
If you have trouble using plugins, check out the Plugins Troubleshooting doc in the main fastlane repo.
fastlane is the easiest way to automate building and releasing your iOS and Android apps. To learn more, check out fastlane.tools.


