AzimoLabs / fastlane-plugin-automated-test-emulator-run

Plugin dedicated for Android platform. Wraps gradle task/shell command used for launching instrumented tests. Provides start of as many AVDs with various configs as needed before test run, waits for boot, kills emulators and deletes them from hdd after tests are finished or disturbed.
MIT License
113 stars 48 forks source link

Running fastlane screengrab on multiple AVDs #35

Open flsg-dev opened 4 years ago

flsg-dev commented 4 years ago

Using https://github.com/AzimoLabs/fastlane-plugin-automated-test-emulator-run/issues/3 as a base for this issue, I would like to run fastlane's Screengrab on all my AVDs and this does not seem to be working at the moment.

My fastfile:

lane :assemble_apk_and_grab_screenshots do
  gradle(task: "assembleDebug assembleDebugAndroidTest")
  screengrab
 end

 lane :grab_screenshots do
  automated_test_emulator_run(
   AVD_setup_path: "~/project/fastlane/AVD_config.json",
   AVD_recreate_new: false,
   AVD_clean_after: false,
   shell_task: "fastlane assemble_apk_and_grab_screenshots"
  )
 end

What this does is launch my AVDs and runs my tests successfully. However, when I get to the screengrab task, only one emulator is showing there are screenshots available on the sdcard. The other emulator shows an error that there are no screenshots stored on the sdcard.

Both AVDs should have screenshots saved to them, since they are running the same tests. However, somehow, the screenshots from the first emulator are being cleaned when the second one completes.

tomLadder commented 3 years ago

Same issue 👍