Preface
Monkey is a command line tool in Android, which can be run in an emulator or on an actual device. Next, I will explain how to test Android apps with real devices
Steps
Connect the mobile phone to the computer (connect with the data cable)
win+r ——> cmd Right-click the administrator to run
First test whether it is connected:
adb devices
Enter adb shell to enter the shell command debugging mode.
adb shell
Enter after pressing enter
pm list package
Then press Enter and there will be such a package name.
Next, we open a new cmd, right-click to run as an administrator
enter
adb shell monkey -p 上面的包名(自己去复制) -v 次数 >保存到哪个路径下的哪个文件夹
E.g
adb shell monkey -p com.taobao.trip -v 20 >g:\one.txt
I saved it in the g drive, so I went to the g drive to open it and
open it.
1 The seed value of the pseudo-random number generator, and 20 random events are generated.
2 The specified package
3 The ratio of the various random events to be generated.
1 The various sent Random event description
2 Monkey completes the result prompt.
https://blog.csdn.net/hanhanwanghaha Welcome to follow this super invincible and cute duck. If you have any questions, you can leave a private message and you will reply if you see it!
If reproduced, please indicate the source