3

I am using Fastlane plugin automated_test_emulator_run

automated_test_emulator_run(
    AVD_setup_path: "~/<path to your avd setup>/AVD_setup.json",
//some more tasks
  )

now trying to run this same via command line

fastlane automated_test_emulator_run AVD_setup_path:avd.json

but getting eror

[!] Could not find 'automated_test_emulator_run'. Available lanes: test

any hint to use any plugin and pass setup parameters for that?

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
user2299735
  • 69
  • 1
  • 9

1 Answers1

10

I haven't done exactly this but have done something similar so following should work I believe:

lane :your_emulator_lane do |options|
    avdSetupPath = options[:AVD_setup_path]

    automated_test_emulator_run(
        AVD_setup_path: avdSetupPath,
    )

end

Would then call

fastlane your_emulator_lane AVD_setup_path:avd.json
John O'Reilly
  • 10,000
  • 4
  • 41
  • 63
  • Thanks for help. same I am doing. I do not want to use file for lane setup – user2299735 Jan 16 '18 at 17:57
  • setting a Jenkins pipeline job, Jenkins pipeline does not support android emulator. a repository may not have Fastlane file and a user can input custom emulator configuration on runtime – user2299735 Jan 16 '18 at 18:04
  • found solution: fastlane run automated_test_emulator_run AVD_setup_path:"avd.json" – user2299735 Jan 17 '18 at 00:04