qileilove

          blog已經轉移至github,大家請訪問 http://qaseven.github.io/

          Android 單元測試cmd 命令集

           對app進行單元測試時,或使用robotium進行黑盒測試時,需要把測試apk安裝到模擬器或者android真機上,然后用命令去驅動測試
            1.運行測試程序命令-運行測試工程中所有test方法:
            >adb shell am instrument -w 測試程序packageName/android.test.InstrumentationTestRunner
            例如:
            >adb shell am instrument -w com.example.action02.test/android.test.InstrumentationTestRunner
            2.運行測試程序命令-運行測試工程中指定測試類方法:
            >abd shell am instrument -e class package.testClass(測試類) -w packageName/android.test.InstrumentationTestRunner
            例如:adb shell am instrument -e class com.example.action02.test.testlogin  -w com.example.action02.test/android.test.InstrumentationTestRunner
            3.運行測試程序命令-運行單個測試方法
            >adb shell am instrument -e class package.testClass#testmethod -w cpackageNameandroid.test.InstrumentationTestRunner
            例如:adb shell am instrument -e class com.example.action02.test.testloginandquit#testlogin  -w com.example.action02.test/android.test.InstrumentationTestRunner

          posted on 2014-01-24 16:15 順其自然EVO 閱讀(442) 評論(0)  編輯  收藏 所屬分類: android

          <2014年1月>
          2930311234
          567891011
          12131415161718
          19202122232425
          2627282930311
          2345678

          導航

          統計

          常用鏈接

          留言簿(55)

          隨筆分類

          隨筆檔案

          文章分類

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 久治县| 铜川市| 南川市| 七台河市| 滁州市| 丰台区| 酉阳| 杭锦后旗| 上虞市| 上饶市| 胶南市| 常州市| 明水县| 杭州市| 巩义市| 金门县| 洮南市| 甘德县| 余庆县| 汝阳县| 大洼县| 乌拉特前旗| 玉门市| 定安县| 抚顺市| 旺苍县| 嵊州市| 上思县| 巨鹿县| 定西市| 海门市| 雅安市| 两当县| 磐安县| 内江市| 赤水市| 宁津县| 拉萨市| 敦化市| 安丘市| 民权县|