qileilove

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

          UIAutomation: 通過命令行運行測試用例

           為了實現自動定時的運行腳本,我們需要在命令行運行和啟動腳本,具體代碼如下:
          instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate
          <full_path_to_application>
          -e UIASCRIPT <path_to_script.js>
          -e UIARESULTSPATH <output_results_path>
            1.  -t 后面的參數為 Automation.tracetemplate 的路徑,每個版本的位置都有所不同,在命令行下使用 instruments -s 命令進行查詢。
            2.  full_path_to_application 是你的的被測應用的完整目錄,需要在前后加上雙引號。
            3.  -e UIASCRIPT  指定執行的 js 腳本存放的位置,需要在前后加上雙引號。
            4.  -e UIARESULTPATH  指定輸出結果存放的路徑,需要在前后加上雙引號。
            5. 如果需要在真機運行,在-t 參數前加上  -w UDID, 其中UDID為被連接手機的設備標識(可通過iTools查看)。
            舉例在我本地模擬器上的腳本如下:
          instruments -t
          /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate
          "/Users/wangxinxin/Library/Developer/Xcode/DerivedData/TestAutomation-ahmqgmqipyidexemazbprqxqkrya/Build/Products/Debug-iphonesimulator/TestAutomation.app"
          -e UIASCRIPT "/Users/wangxinxin/Documents/TestAutomation/test.js"
          -e UIARESULTSPATH "/Users/wangxinxin/Documents/TestAutomation"
          相關文章
          UIAutomation: 登錄界面測試實例

          posted on 2014-05-16 11:02 順其自然EVO 閱讀(259) 評論(0)  編輯  收藏 所屬分類: selenium and watir webdrivers 自動化測試學習

          <2014年5月>
          27282930123
          45678910
          11121314151617
          18192021222324
          25262728293031
          1234567

          導航

          統計

          常用鏈接

          留言簿(55)

          隨筆分類

          隨筆檔案

          文章分類

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 临沭县| 楚雄市| 大庆市| 扶绥县| 茶陵县| 友谊县| 台东县| 木兰县| 庄浪县| 金华市| 菏泽市| 南江县| 襄垣县| 焉耆| 清涧县| 隆林| 城步| 平谷区| 子长县| 武鸣县| 弋阳县| 昔阳县| 剑河县| 马鞍山市| 乌兰浩特市| 辉县市| 平陆县| 旬邑县| 正阳县| 博客| 安徽省| 陕西省| 平乡县| 巴东县| 嵩明县| 桃园市| 巴林左旗| 古蔺县| 宜宾市| 清涧县| 镇安县|