To Stop the Monkey command:
1. PS command to find the Uiautomator process
Open cmd Command Line window
Input:
ADB Shell PS | grep Monkey
The first number returned, which is the process number of the monkey
The 2.kill command end process continues to enter:
ADB shell kill [process number just found]
End other processes as well, and other applications can also use this method to
Test APK Collection
The APK app Collection is blacklisted and whitelisted, which means that the system will execute an APK other than the blacklist, and the whitelist is only the apk that executes on the whitelist.
How to set the blacklist:
A. Create a TXT document called blacklist, enter the application's package name in the file, such as the MMS app, enter Com.android.mms in the file, and if more than one application does not want to be executed, add multiple package names to the file, and note that the return key is used between the package name and the package name.
B. Import the Blacklist.txt file into the/data directory of your phone , then use the--pkg-blacklist-file parameter when performing the monkey test, plus the storage path of the blacklist file. Other parameter settings are no different than testing a single apk.
How to set the Whitelist:
The whitelist setting method is basically the same as the blacklist setting, except that the file command should be whitelist when creating a txt document. In the execution of monkey, only white-list applications are executed.
Execute a single apk:
Monkey–p <options>-C <options>-S <seed> < limit statements >--throttle <milliseconds>-v execution times > c:\m Onkey_test.txt
To execute the APK collection:
Monkey–pkg-blacklist-file/data/blacklist.txt-c <options>-S <seed> < restriction statements >--throttle < Milliseconds>-V executions > C:\blacklist_test.txt//Do not blacklist applications
Or
Monkey–pkg-whitelist-file/data/whitelist.txt-c <options>-S <seed> < restriction statements >--throttle < Milliseconds>-V executions > C:\whitelist_test.txt/Whitelist Apps
Five, the setting does not depend on the USB
When performing the monkey test, if the log of the monkey test is stored in the SDcard or other directory of the phone, and a & symbol is added at the end of the Monkey Test command, the monkey can continue without USB connection. Such as:
Monkey–p com.android.mms–s--throttle 1000–v–v–v 15000 >/mnt/sdcard/monkey_test.txt&
Original link
Turn: Android command Monkey stress test, detailed