App性能測試 Monkey常用的命令
1.adb devices? 確認手機和電腦成功鏈接
2.adb install(包名).apk使用命令行安裝軟件
3.Adb logcat | grep START? ? 或长踊。? aapt dump badging(app)獲取app包名
4.adb shell monkey -p(包名)1000? 給指定的app打壓力
5.“Throttle”指定時間之間的間隔
6.adb shell monkey -p(包名)—throttle(時間)100? 每隔多少時間執(zhí)行一個事件
7.“seed”參數(shù) 指定隨機生成數(shù)的seed值
8.Adb shell monkey -p(包名)—seed -s 100 50可以是每次執(zhí)行的隨機操作一致
9.adb shell monkey -p(包名)—pct-touch“—pct-touch”設定觸摸事件百分比,可以只讓他執(zhí)行觸摸事件
10.adb shell monkey -v -p(包名)—pct-touch 100 100加入-v挨务。可以查看每一步操作
11.動作事件批狐,設定動作百分比”—pct-motion”
?adb shell monkey -v -p(包名)—pct-touch 50 —pct-motion 30 100
12.軌跡球事件滨彻,設置軌跡球事件的百分比
adb shell monkey —pct-trackball
13.基本導航事件,設定基本導航事件百分比焕议,輸入設備的上宝磨,下,左盅安,右
adb shell monkey —pct-nav
14.主要大航事件唤锉,設定主要導航事件百分比,兼容中間鍵别瞭,返回鍵窿祥,菜單鍵
adb? shell monkey —pct-majornav
15.系統(tǒng)導航事件,設定系統(tǒng)導航百分比蝙寨,HOME晒衩,BACK,撥號及音量鍵
adb shell monkey —pct-syskeys
16.啟動Activity事件墙歪,設定啟動Activity的事件百分比
adb shell monkey —pct-appswitch
17.不常用事件听系,設定不常用事件的百分比
adb shell monkey —pct-anyevent
18.崩潰事件,忽略崩潰和異常
adb shell monkey —ignore-crashes
19.超時事件虹菲,忽略超時事件
adb shell monkey —ignore-timeouts