測(cè)試前提:
1) 手機(jī)初始化;
2) 連接wifi;
3) 進(jìn)入設(shè)置-亮度和字體,關(guān)閉自動(dòng)調(diào)節(jié)開關(guān),自動(dòng)鎖屏選擇不休眠;
4) (版本已默認(rèn)打開,不用再打開)進(jìn)入設(shè)置-輔助功能-開發(fā)人員工具,開啟USB調(diào)試;
5) 開啟log:
a)? 移動(dòng)端撥號(hào)盤輸入:*#*#3646633#*#*,進(jìn)入mtklog項(xiàng),家庭端在wifi框內(nèi)輸入*#1006#,進(jìn)入原生設(shè)置,進(jìn)入關(guān)于平板電腦,點(diǎn)按5次版本號(hào)進(jìn)入開發(fā)者模式,再點(diǎn)3次內(nèi)核版本進(jìn)入mtklog項(xiàng);
b)點(diǎn)擊右上角按鈕進(jìn)入頁(yè)面,只開啟MobileLog,關(guān)閉剩余項(xiàng);
c)點(diǎn)擊MobileLog進(jìn)入MobileLog 頁(yè)面,將Limit current Log Size和Limit Total Log Size分別 設(shè)置為4096MB、8192MB;
d)開啟mtklog;
7)blacklist.txt僅為參考,可以創(chuàng)建whitelist.txt進(jìn)行替代。
自動(dòng)化測(cè)試:
測(cè)試要求:測(cè)試機(jī)10臺(tái)(根據(jù)項(xiàng)目要求設(shè)置執(zhí)行的時(shí)間)
1).黑名單blacklist.txt拷入手機(jī)
adb push 黑名單路徑 /data/local/tmp/
2)進(jìn)入cmd,打開adb 執(zhí)行adb shell
3)設(shè)置免關(guān)機(jī) setprop ro.monkey true
4)執(zhí)行命令(全模塊):monkey --pkg-blacklist-file? /data/local/tmp/blacklist.txt? --throttle 1000 --ignore-crashes --ignore-timeouts --ignore-security-exceptions --ignore-native-crashes --monitor-native-crashes? -v -v -v 360000 >> /mnt/sdcard/monkey.txt
執(zhí)行命令(單個(gè)):monkey --p -單個(gè)包名 --throttle 1000 --ignore-crashes --ignore-timeouts --ignore-security-exceptions --ignore-native-crashes --monitor-native-crashes -v -v -v 360000>> /mnt/sdcard/monkey.txt
執(zhí)行命令(驗(yàn)證問(wèn)題):monkey --pkg-blacklist-file /data/local/tmp/blacklist.txt --throttle 1000 --ignore-crashes --ignore-timeouts --ignore-security-exceptions --ignore-native-crashes --monitor-native-crashes -s 上次出現(xiàn)問(wèn)題的seed值 -v -v -v 360000 >> /mnt/sdcard/monkey.txt
5)標(biāo)配充電器充電