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