-
手動測試出現(xiàn)ANR的日志查看步驟:
adb shell? ?#進入手機系統(tǒng)
cd /data/anr? ?#進入日志文件目錄
ls? ?#查看anr目錄下文件
more traces.txt? ?#查看日志
查看全部 -
奔潰事件
忽略奔潰和異常:
命令:adb shell monkey --ignore-crashes<event-count>
忽略超時事件:??
命令:adb shell monkey--ignore-timeouts<event-count>
查看全部 -
1、動作事件:
設定動作事件百分比??
命令:adb shell monkey--pct-motion<percent ,百分比>事件數(shù)
2、軌跡球事件:
設定軌跡球事件百分比?
命令:adb shell monkey --pct-trackball<percent,百分比>事件數(shù)
3、基本導航事件:
設定基本導航事件百分比,輸入設備的上、下、左、右
命令:adb shell monkey --pct-nav<percent,百分比>事件數(shù)
4、主要導航事件:
設定主要導航事件百分比,兼容中間鍵、返回鍵、菜單鍵
命令:adb shell --pct-majornav<percent,百分比>事件數(shù)
5、系統(tǒng)導航事件:
設定系統(tǒng)導航事件百分比,HOME、BACK、撥號及音量鍵? ?
命令:adb shell monkey --pct-syskeys<percent,百分比>事件數(shù)
6、啟動ACtivity 事件:
設定Activity的事件百分比?
?命令:adb shell monkey --pct-appswitch<precent,百分比>
7、不常用事件:
設定不常用事件的百分比。?
?命令 adb shell monkey --pct-anyevent<percent>
查看全部 -
觸摸事件:
設定觸摸事件百分比。? ?
命令:? adb shell monkey --pct -touch <percent,百分比> 事件數(shù)
查看全部 -
seed參數(shù): 指定隨機生成數(shù)的seed值,生成相同的結果值??
命令:adb shell monkey -s <seed值> <event-count值>
查看全部 -
Monkey高級參數(shù)的應用
throttle參數(shù)表示指定事件之間的間隔后面+毫秒+執(zhí)行的次數(shù)
adb shell monkey -p 包名 --throttle 1000 1000
查看全部 -
給指定的包打壓力:
adb shell monkey -p package 1000
查看全部 -
獲取包名:
1、輸入命令:adb logcat | grep START
2、打開想要獲取包名的app,在打印處查看包名
查看全部 -
發(fā)送壓力指令
adb shell monkey 1000
查看全部 -
實現(xiàn)代買2
查看全部 -
實現(xiàn)代碼1
查看全部 -
alert參數(shù)分別是message,title,ok按鈕
查看全部 -
MonkeyScript腳本
查看全部
舉報