測試點:APP響應時間和響應速度測試
冷啓動:首次啓動App的時間間隔,不包括頁面加載,只是啓動時間。
熱啓動:非首次啓動App的時間間隔,不包括頁面加載,只是啓動時間。
測試方法:
冷啓動:
adb shell am start -W com.XXX.XXX/.ui.LauncherUI
***絕對路徑,首個Activity。dos命令下獲取路徑命令:adb shell dumpsys window w |findstr \/ |findstr name=
***am是shell中集成的一個命令,ActivityManager的簡寫。
***-W是指啓動完成後,返回啓動耗時。
***可能存在app緩存(提示:Warning Activity not started,intent has been delivered to corrently running top-most instant)建議重新打開模擬器後,直接運行命令)
***
***
ThisTime:該Activity的啓動耗時,單位ms。
TotalTime:應用自身啓動耗時,This time+應用Application等資源啓動時間;
WaitTime:系統啓動應用耗時,TotalTime+系統資源啓動時間。
******--------如果關心某個應用自身啓動耗時,參考TotalTime;
******--------如果關心繫統啓動應用耗時,參考 WaitTime
******--------如果關心應用所有界面Activity啓動耗時,參考 ThisTime;
熱啓動:按返回鍵後在其啓動adb命令。
****************************************測試標註:冷啓動時間不超過15s,熱啓動不超過1s****************************************