Fastlane passing parameters to plugin

8k Views Asked by At

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?

1

There are 1 best solutions below

3
On

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