hjanuschka / fastlane-plugin-aws_device_farm

This Plugin Allows XCUITests and android Instrumentation tests run on AWS device Farm
MIT License
86 stars 34 forks source link

Can I upload Appium Nodejs tests through this plugin? #41

Open psatler opened 4 years ago

psatler commented 4 years ago

I can see from the repo description that it says this plugin allows XCUITests and android Instrumentation tests run on AWS device Farm.

Though, is it able to upload Appium Nodejs tests through this script?

I have some tests written with Webdriverio and Appium, and currently I'm uploading them manually to AWS Device Farm, so I'm looking for a way to automate this process when there is a new app build.

Kind regards,

hjanuschka commented 4 years ago

i am not an expert in appium or any of those technics you mentioned. so i guess the answer is no, as of today.

if you upload a xcuitest to device farm - manually - chances might be good that this can be automated

psatler commented 4 years ago

No problem @hjanuschka ! Thanks for the reply.

skheirandish commented 4 years ago

Looking at https://github.com/hjanuschka/fastlane-plugin-aws_device_farm/blob/master/lib/fastlane/plugin/aws_device_farm/actions/aws_device_farm_action.rb seems that it should work for React Native apps as long as the project name, binary_path, test_package_type, test_type (maybe), and device_pool are set properly, right? After all with React Native apps using Appium we just submit an apk (or ipa) file and select Appium Node js tests from AWS console and it works. However I haven't managed to get it to work with this library. Seems that the errors are too generic and i cant easily pin point the issue easily.

~I think we need to change this line to account for other types of tests:~ ~type = File.extname(path) == '.apk' ? 'ANDROID_APP' : 'IOS_APP'~

~@hjanuschka you think this change can be applied to the library?~

Looks like the changes were applied in ccde69d commit

This example works for me when uploading for React Native Appium Android:

aws_device_farm(
      name:                '<project_name>',
      binary_path:         '<path_to>app-debug.apk',
      test_binary_path:    '<path_to>app.zip',
      test_package_type:   'APPIUM_NODE_TEST_PACKAGE',
      test_type:           'APPIUM_NODE',
      test_spec:           'arn:aws:devicefarm:us-west-2:###########:upload:#######',
      device_pool:         '<name_of_device_pool>',
      wait_for_completion:  true,
      print_web_url_of_run: true,
      billing_method:      'UNMETERED'  
    )