Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fastlane-plugin-aws_device_farm

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastlane-plugin-aws_device_farm

  • 0.3.26
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

AWS Device Farm Plugin for Fastlane

fastlane Plugin Badge

About

This Plugin allows tests run on AWS device Farm

iOSAndroidFail
ScreenshotScreenshotScreenshot

Setup

Add Plugin

fastlane add_plugin aws_device_farm

Create Device Pools

Open your AWS dashboard and under AWS-Device Farm - configure your Device Pools. Select the devices you want to run the tests on.

Create a project on AWS

in this example we called this fastlane

Example iOS

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
end

Example Android

lane :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

The plugin also exposes two ENV variables in case you want to make additional calls after the action is finished. ENV["AWS_DEVICE_FARM_RUN_ARN"] containing the arn of the run
ENV["AWS_DEVICE_FARM_PROJECT_ARN"] containing the arn of the project
ENV["AWS_DEVICE_FARM_WEB_URL_OF_RUN"] containg the web url of the run

Options

  • aws_device_farm
OptionDefaultDescriptionTypeRequired
namefastlaneAWS Device Farm Project NameString:white_check_mark:
run_nameDefine the name of the device farm runString
binary_pathPath to App BinaryString:white_check_mark:
test_binary_pathPath to test bundleString
test_package_typeType of test packageString
test_typeType of testString
pathDefine the path of the application binary (apk or ipa) to upload to the device farm projectString:white_check_mark:
device_poolIOSAWS Device Farm Device PoolString:white_check_mark:
network_profile_arnNetwork profile arn you want to use for running the applicationsString
wait_for_completiontrueWait for Test-Run to be completedBoolean
allow_device_errorsfalseDo you want to allow device booting errors?Boolean
allow_failed_testsfalseDo you want to allow failing tests?Boolean
filterDefine a filter for your test run and only run the tests in the filter (note that using test_spec overrides the filter option)String
billing_methodMETEREDSpecify the billing method for the runString
localeen_USSpecify the locale for the runString
test_specDefine the device farm custom TestSpec ARN to use (can be obtained using the AWS CLI devicefarm list-uploads command)String
print_web_url_of_runfalseDo you want to print the web url of run in the messages?Boolean
print_waiting_periodstrueDo you want to print . while waiting for a run?Boolean
junit_xml_output_pathjunit.xmlJUnit xml output pathString
junit_xmlfalseDo you want to create JUnit.xml?Boolean
artifactfalseDo you want to download Artifact?Boolean
artifact_output_dir./test_outputsArtifact output directoryString
artifact_types[]Specify the artifact types one wants to downloadArray
test_parametersThe test's parameters, such as test framework parameters and fixture settings. Parameters are represented by name-value pairs of strings.Hash

Possible types see: http://docs.aws.amazon.com/sdkforruby/api/Aws/DeviceFarm/Client.html#create_upload-instance_method

  • aws_device_farm_package
OptionDefaultDescriptionType
derrived_data_pathDerrived Data Path, containing a build-for-testing derrived-data folderString
derrived_data_pathDevelopmentSpecify the Build-Configuration that was used e.g.: DevelopmentString

Credit

it is based on a custom action by @icapps (https://github.com/icapps/fastlane-configuration) added the following:

  • iOS Support for XCUITests
  • support current fastlane version
  • improve output
  • make it available as a fastlane plugin

Troubleshooting

If you have trouble using plugins, check out the Plugins Troubleshooting doc in the main fastlane repo.

About fastlane

fastlane is the easiest way to automate building and releasing your iOS and Android apps. To learn more, check out fastlane.tools.

FAQs

Package last updated on 19 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc