Does the Android – will monkey test occasionally enter the settings and click the restart button to restart the device?

When conducting monkey test on Android device, I send

adb shell monkey --ignore-security-exceptions --ignore-crashes --ignore-timeouts --ignore-native-crashes --throttle 200 -s 222 -v -v -v 125000 > c:\all_monkey.txt

Then monkey will send a large number of random events to the device. I can see many swiping cards or clicking buttons. Will monkey occasionally enter the settings and click the restart button to restart the device? Because I found that after running for a period of time, the device will restart automatically. I can avoid the monkey test alone and click the restart button. Thank you

resolvent:

Yes, you can use this check in the activity manager to wrap the restart function:

if(!ActivityManager.isUserAMonkey()){
//your code
}

isUserAMonkey ():

Editor: because I misunderstood this question for the first time, here are some possible useful answers:

-p flag

adb shell monkey -p your.application.id.here //to restrict mokey to your application

–pct-syskeys

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>