1.只做压力测试,不保存日志
adb shell monkey -p com.example.hello 10
2、将日志保存在电脑上的e:\log1.txt文件中
adb shell monkey -p com.example.hello 10 >e:\log1.txt
运行结果:
查看日志文件
3、保存日志的详细信息
参数-v的个数决定了日志的详细程度,有三个级别,v越多,日志越详细。
adb shell monkey -p com.example.hello 10 >e:\log1.txt
adb shell monkey -v -p com.example.hello 10 >e:\log2.txt
adb shell monkey -vv -p com.example.hello 10 >e:\log3.txt
adb shell monkey -vvv -p com.example.hello 10 >e:\log4.txt
4、压测实战
adb shell monkey -s 0 -vvv -p com.example.hello --throttle 100 --ignore-crashes --ignore-timeouts --ignore-security-exceptions --ignore-native-crashes --monitor-native-crashes 1000 >e:\log1.txt 2>&1
日志信息:
日志下载链接:https://pan.baidu.com/s/1bzS2k9uSWjm0fUY-pknnLg
提取码:uz4i