Reputation: 41
Sometimes, WIFI is turned off with following command to run monkey test on Android. Is there any method to prevent the Android monkey to turn off WIFI?
adb -s foo shell monkey -p com.foo.bar --throttle 300 --kill-process-after-error --pct-syskeys 0 --pct-trackball 0 --pct-touch 90 --pct-motion 10 -v 5000
Upvotes: 4
Views: 1442
Reputation: 21766
To avoid system events in Monkey testing there is option --pct-syskeys
which is responsible for system level events but I think --pct-syskeys 0
is not working.
There is work around for this, Screen Pinning your app. By doing this only your app will be tested and will not turn off Wi-Fi and you can perform your testing. Follow below steps:
Overview button
(right most button next to Home button) and pin your appNote: If your are testing on Emulator. Once you are done with testing, to unpin your app you must have to restart your Emulator. Restart emulator
is the only option to unpin your app on Emulator.
Above testing is done on Android 8 emulator.
Upvotes: 1