拿走不謝,改包名后直接運(yùn)行
adb shell monkey -p com.xxx --pct-touch 40 --pct-motion 25 --pct-appswitch 10 --pct-rotation 5 -s 9527 --throttle 400 --ignore-crashes --ignore-timeouts -v-v 500000
逐個(gè)說明
在包名為com.xxx的App內(nèi)執(zhí)行5000次操作
adb shell monkey -p com.xxx 5000
偽隨機(jī)數(shù)種子值為9527
adb shell monkey -p com.xxx -s 9527 5000
兩次操作的間隔為100毫秒
adb shell monkey -p com.xxx --throttle 100 5000
觸摸操作的占比為40%
adb shell monkey -p com.xxx --pct-touch 40 5000
啟動(dòng)Activity占比為10%
adb shell monkey -p com.xxx -pct-appswitch 10 5000
日志反饋信息級(jí)別為L(zhǎng)evel2
adb shell monkey -p com.xxx -v-v-v 5000
Crash后繼續(xù)測(cè)試
adb shell monkey -p com.cetc22.clw.jryg --ignore-crashes 5000
ANR后繼續(xù)測(cè)試
adb shell monkey -p com.cetc22.clw.jryg --ignore-timeouts 5000
保存日志到D盤
adb shell monkey >d:\monkey.txt
標(biāo)注流和錯(cuò)誤流分開保存到手機(jī)
>adb shell
>monkey 1>/sdcard/monkey.txt 2>/sdcard/error.txt
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。