开发者

Monkey command to execute all the packages at a time

I am using following command to execute specific package:

adb shell monkey -v -p com.google.android.apps.maps 500

adb shell monkey -p com.google.android.voicesearch 10

Q-1: But I want to execute all the packages in batch mode,can anyone please sugg开发者_如何学Cest? I have used a process like putting all the individual commands in batch file and executing but it is not working after first command execution.

Q-2: Can you please suggest what is the command only to put random key strokes through out the phone?

Thanks in Advance !!!


You could try writing a monkey script (eg. test.txt):

# Start of Script
type= user
count= 1
speed= 1.0
UserWait(200)
start data >>

LaunchActivity(com.company.application1.Activity, com.company.application1.Activity)
UserWait(2000)
# Do stuff

LaunchActivity(com.company.application2.Activity, com.company.application2.Activity)
UserWait(2000)
# Do stuff

LaunchActivity(com.company.application3.Activity, com.company.application3.Activity)
UserWait(2000)
# Do stuff

and then run it by calling

monkey -f test.txt 1
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜