qileilove

          blog已經(jīng)轉(zhuǎn)移至github,大家請(qǐng)?jiān)L問 http://qaseven.github.io/

          UIAutomation: 通過命令行運(yùn)行測(cè)試用例

           為了實(shí)現(xiàn)自動(dòng)定時(shí)的運(yùn)行腳本,我們需要在命令行運(yùn)行和啟動(dòng)腳本,具體代碼如下:
          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 后面的參數(shù)為 Automation.tracetemplate 的路徑,每個(gè)版本的位置都有所不同,在命令行下使用 instruments -s 命令進(jìn)行查詢。
            2.  full_path_to_application 是你的的被測(cè)應(yīng)用的完整目錄,需要在前后加上雙引號(hào)。
            3.  -e UIASCRIPT  指定執(zhí)行的 js 腳本存放的位置,需要在前后加上雙引號(hào)。
            4.  -e UIARESULTPATH  指定輸出結(jié)果存放的路徑,需要在前后加上雙引號(hào)。
            5. 如果需要在真機(jī)運(yùn)行,在-t 參數(shù)前加上  -w UDID, 其中UDID為被連接手機(jī)的設(shè)備標(biāo)識(shí)(可通過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"
          相關(guān)文章
          UIAutomation: 登錄界面測(cè)試實(shí)例

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

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

          導(dǎo)航

          統(tǒng)計(jì)

          常用鏈接

          留言簿(55)

          隨筆分類

          隨筆檔案

          文章分類

          文章檔案

          搜索

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          主站蜘蛛池模板: 台安县| 阿拉善盟| 大同县| 苍梧县| 凯里市| 松溪县| 保德县| 广水市| 盐亭县| 博野县| 乐陵市| 团风县| 濮阳县| 柞水县| 渭源县| 山阳县| 三原县| 文昌市| 巩义市| 富锦市| 景泰县| 华坪县| 金华市| 金秀| 衡山县| 大兴区| 陆丰市| 将乐县| 泾川县| 勃利县| 广汉市| 洛浦县| 舞钢市| 巩留县| 永嘉县| 靖江市| 阳新县| 英山县| 合川市| 望谟县| 疏勒县|