Android系統單元測試方法(12)

發表于:2011-06-30來源:未知作者:領測軟件測試網采編點擊數: 標簽:
adbshellaminstrument-e class com.android.ut.test.TestApp-wcom.android.ut/android.test.InstrumentationTestRunner adb shell am instrument -e class com.android.ut.test.TestApp -wcom.android.ut/android.te
  1.   adb shell am instrument -e class com.android.ut.test.TestApp -wcom.android.ut/android.test.InstrumentationTestRunner  


  這樣你就可以看到測試結果了。

Java代碼 復制代碼 收藏代碼
  1. # am instrument -e class com.cn.test.TestApp -w com.cn/android.test.InstrumentationTestRunner   
  2.   
  3. com.cn.test.TestApp:..   
  4. Test results for InstrumentationTestRunner=..   
  5. Time: 2.866  
  6.   
  7. OK (2 tests)  


后臺測試log日志信息

Java代碼 復制代碼 收藏代碼
  1. D/AndroidRuntime(  941): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<   
  2. D/AndroidRuntime(  941): CheckJNI is ON   
  3. D/AndroidRuntime(  941): --- registering native functions ---   
  4. D/FileBackupHelper_native(  941): register_android_backup_FileBackupHelper   
  5. D/ActivityManager(  581): Uninstalling process com.cn   
  6. I/ActivityManager(  581): Start proc com.cn for added application com.cn: pid=948 uid=10013 gids={}   
  7. I/TestRunner(  948): started: testSum(com.cn.test.TestApp)      //啟動add()測試方法   
  8. I/ActivityManager(  581): Starting activity: Intent { act=android.intent.action.MAIN flg=0x10000000 cmp=com.cn/.AndroidUT }   
  9. I/ActivityManager(  581): Displayed activity com.cn/.AndroidUT: 

    原文轉自:http://www.anti-gravitydesign.com

国产97人人超碰caoprom_尤物国产在线一区手机播放_精品国产一区二区三_色天使久久综合给合久久97