1.monkey Profile
After downloading Android studio, under the sdk / tools have a bat file monkeyrunner.bat, this is the monkey, monkey or call the bottom of the various commands adb
monkey command in the form of pseudo-random test app test various operations, commonly used in smoke testing and performance testing app terminal product is provided when many clicks, the pressure may be measured as
2. Use
adb shell monkey of common parameters (execute adb shell monkey can view all parameters)
-p select the package name
--ignore-crashes --ignore-timeouts --ignore-security-exceptions --monitor-native-crashes ignore using four parameters, let monkey monkey ignored may lead to erroneous termination of the script, continue until all completed events
--pct specified percentage of certain types of events
-v specifies the log level, generally use -v -v -v specifies the highest level
-S random events seed number, seed number generating the same random seed the same sequence of operations can be specified easily, such as 123456; if specified, will be automatically assigned a seed
--Throttle set operation delay in ms
COUNT number of executions (executions parameters written in the last face)
The operations performed randomly
adb shell monkey -p com.baidu.tieba -v -v -v --throttle 200 200 > E:\monkey.log
As used pct parameters and ignore
adb shell monkey -p com.taobao.taobao --ignore-crashes --ignore-timeouts --ignore-security-exceptions --ignore-native-crashes --pct-touch 50 --pct-motion 50 -v -v -v 2000>D:\taobao3.log
3. log parsing
(1) seed of the value monkey, on behalf of the seed sequence number, the equivalent of a monkey to pick up the corresponding number in the course of implementation, if the test has a bug needs to reproduce, try using the same seed value to the parameter pct complete the operation (not necessarily a hundred percent reproducible)
(2) monkey percentage of events, such as a click, scroll, etc., below is the 0 to 11 events, each event corresponding to the specific operation will be posted in the following with reference to the link
(3) view the log when various exceptions log major search keywords, such as error, exception, ANR (application not responding), crash, Fail, etc.
4. Reference Links
monkey Usage: https://www.cnblogs.com/miniren/p/4858788.html
monkey percentage of events: https://blog.csdn.net/zhanglu_400/article/details/50750298