Giter VIP home page Giter VIP logo

fastlane-plugin-aws_device_farm's Introduction

AWS Device Farm Plugin for Fastlane

fastlane Plugin Badge

About

This Plugin allows tests run on AWS device Farm

iOS Android Fail
Screenshot Screenshot Screenshot

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

Options

  • 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 test bundle String
test_package_type Type of test package String
test_type Type of test 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
allow_failed_tests false Do you want to allow failing tests? Boolean

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

  • 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

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.

fastlane-plugin-aws_device_farm's People

Contributors

hjanuschka avatar hazat avatar krausefx avatar rlecaro2 avatar rmhartog avatar

Watchers

James Cloos avatar dev.with avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.