Closed deepanshumadan closed 7 years ago
Hello,
It never happened in my case, but I figured out that it might happen on weaker computers or when you use a lot of CPU power and PC works slower.
So you can edit this parameter by yourself like that from your fastfile where you use emulator plugin:
desc "Runs tests with usage of emulator plugin"
lane :automation_integrationTests do
automated_test_emulator_run(
AVD_setup_path: "~/Dev/Azimo-Android/fastlane/AVD_configs/AVD_config.json",
gradle_task: "connectedAndroidTest",
# add any value you like, default is 60
AVD_param_launch_timeout: "120"
)
end
Check out list of parameters you can use to additionally change behaviours of plugin. They have each added a description field. I didn't cover them in the blog post because it would be too long I guess.
As a further comment I can say that emulator launch is divided into two phases:
AVD_adb_launch_timeout
param and editing it's value.adb devices
will plot that all your AVDs are "device" already - it is not enough because at that time some of your AVDs are still in the animation phase (you see animated Android logo on the screen). So if you start your tests directly by instrumentation runner - they tend to launch instantly, APK install also starts instantly. So you might be lucky and this "device" status will be enough and you can run your tests, but you might be late and then your test process fill fail in terminal before you even launch the tests. So in order to prevent that we wait until dev.bootcomplete
, sys.boot_completed
return value 1
(as a boolean it's true
) and additionally we want animation to be off so we wait until init.svc.bootanim
value is stop
. And we give it by default 60 seconds which is stored in AVD_param_launch_timeout
and can be changed by you from fastfile. So, if you have any more problems -> report here, I will try to help :)
Awesome it works now with the parameters, thanks for getting back!!
Great!!! :) Thanks for using our plugin!
Its not able to launch more than 3 or 4 emulators on a mac mini. I am trying to launch 5 emulators with same configuration. I have given my HAXM around 11 gb memory (i can launch 5 emulators manually so memory is not an issue). It "waits for ADB to boot completed with success" for all the emulators and says "Avd param loading took more than 60. Attempting to re-launch", after launching 3 out of 5 emulators and tries to relaunch and is never able to launch, goes to a loop. Is it a good idea to have this timeout as a parameter too? or increase the timeout?