Closed joreilly closed 7 years ago
Hello,
I have never used screengrab
but I've just checked GitRepo of this tool. I will take a closer look at it tomorrow, yet I am quite sure that it should work.
You can start other fastlane
lanes with usage of this tool. So for example you could try something like this:
lane :assemble_apk_and_grab_screenshots do
gradle(task: "assembleDebug assembleAndroidTest")
Action.sh("screengrab")
end
lane :grab_screenshots do
automated_test_emulator_run(
AVD_setup_path: "fastlane/MyConfigs/AVD_ConfigForScreengrab.json",
shell_task: "fastlane assemble_apk_and_grab_screenshots"
)
end
assemble_apk_and_grab_screenshots
lane builds your .apk and android-test.apk to be ready for screengrab
.shell task
.fastlane assemble_apk_and_grab_screenshots
. screengrab
will launch. It should use currently available devices - AVDs which were launched by plugin and wait for shell task
to finish. shell task
finishes it's job AVDs are killed and deleted. Thanks @FisherKK for the quick response! Will try that out. BTW am using screengrab from fastlane (such as below)....but same approach will work of course.
lane :screenshots do |options|
gradle(task: 'clean')
gradle(
task: "assembleDebug assembleDebugAndroidTest",
properties: {
....
}
)
screengrab(
locales: ['en-US'],
clear_previous_screenshots: true,
app_package_name: package_name,
use_tests_in_packages: ['com.company.package.screenshots'],
app_apk_path: "app/build/outputs/apk/app-debug.apk",
tests_apk_path: "app/build/outputs/apk/app-debug-androidTest.apk"
)
end
Sure :) No problem! I hope it will work.
Is it only possible to use
gradle_task
andshell_task
when using this? Would be great for example to be able to runscreengrab
.