My Monkey usage example (here I mainly use an actual device to test a reader program I wrote. Of course, you can also test it in the simulator to view the test results. I am using the friendly mini 64 10 Development Board. The android system and the program to be tested have been installed in mini 64 10 ):
1. Connect the development board to the computer through usb. You can run the adb devices command on the command line to check whether the development board is recognized by the computer,
Details:
2. After correctly identifying the development board, use the adb shell to enter the shell of the Development Board.
3. Start Monkey and set parameters to test the program. Specifically, use the following command
Monkey-p com.yaozq.apk books-v 500,
Where-p specifies the package to be tested,-v indicates that Monkey will generate 500 random events to test the program. After you enter this command, the test starts. And print the test information in the command line.
For the printed test information, refer to the last part of the option in my previous translation.
Http://blog.csdn.net/yaolingrui/article/details/7328522