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)

          隨筆分類

          隨筆檔案

          文章分類

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 磐石市| 绵竹市| 榆树市| 砀山县| 长子县| 华蓥市| 介休市| 开原市| 汉寿县| 象州县| 大英县| 铜梁县| 沛县| 定南县| 吉安市| 张家港市| 驻马店市| 武穴市| 平南县| 东至县| 时尚| 陆良县| 屏南县| 台北县| 岑溪市| 壶关县| 衡南县| 报价| 宝兴县| 大安市| 稻城县| 包头市| 普陀区| 公安县| 巍山| 库车县| 启东市| 兴化市| 台安县| 连城县| 桃源县|