zoukankan      html  css  js  c++  java
  • Instruments-Automation: 通过命令行执行测试用例

        为了实现该脚本的自己主动定时执行。我们需要开始在命令行和脚本,详细代码如下所示的:

    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"


    版权声明:本文博客原创文章,博客,未经同意,不得转载。

  • 相关阅读:
    spin lock自旋锁 双链表操作(多线程安全)(Ring0)
    Interlocked单向链式栈
    自旋锁(Spin Lock)
    可等待定时器(获取系统时间)
    APC注入(Ring3)
    IOCP IO完成端口
    异步设备IO OVERLAPPED结构(设备内核对象 事件内核对象 可提醒IO)
    读写锁 SRWLOCK
    shell查看进程
    linux dmesg命令
  • 原文地址:https://www.cnblogs.com/zfyouxi/p/4749768.html
Copyright © 2011-2022 走看看