【问题标题】:Device Simulator/Xcode Instruments Automator crashing when starting from Terminal从终端启动时设备模拟器/Xcode Instruments Automator 崩溃
【发布时间】:2016-05-07 09:31:39
【问题描述】:

在 Xcode Automator Instruments 应用中运行良好。

它有时会运行一次,然后每次尝试都失败。

我尝试使用单击应用程序打开页面上的一个按钮的单个测试创建一个新的 Instruments 跟踪模板文件(不提供测试脚本参数),这也失败了。

我已尝试将新版本的应用程序部署到新的模拟器设备(5、5S、6 等),这也失败了。

“启用 UI 自动化”已在虚拟设备的设置中启用。

使用此命令从终端运行:

仪器 -w '75B90531-10BC-4E6B-A174-A31C588576B7' -t \ '/用户/用户名/库/应用程序支持/仪器/模板/SmokeTestTemp1.tracetemplate' \ '/用户/用户名/库/开发人员/Xcode/DerivedData/Whoop-gysnfwujthrwqhhfbakwvfxuxurd/Build/Products/Debug-iphonesimulator/APPNAME.app' \ -e UIASCRIPT /用户/用户名/createUser.js \ -e UIARESULTSPATH /Users/用户名/Desktop/testoutput

这是终端中的响应:

2016-01-29 08:03:04.914 仪器[7625:406549] 自动化仪器在尝试运行脚本时遇到异常。 UIAScriptAgentSignaledException 2016-01-29 13:03:04 +0000 失败:尝试运行脚本时出错。 仪器跟踪完成(持续时间:36.036934 秒;输出:/Users/username/qa-web/python/instrumentscli30.trace)

这是automationresults.plist文件:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>All Samples</key>
    <array>
        <dict>
            <key>LogType</key>
            <string>Fail</string>
            <key>Message</key>
            <string>An error occurred while trying to run the script.</string>
            <key>Timestamp</key>
            <date>2016-01-29T13:13:41Z</date>
            <key>Type</key>
            <integer>7</integer>
        </dict>
    </array>
    <key>version</key>
    <integer>2</integer>
</dict>
</plist>

instrumentscli31.trace 文件有 23.5mb 的 dtrace 事件,跟踪日志只有一行:

尝试运行脚本时出错。

OSX 10.11.4 测试版 (15E33e)

15" MBPr,2.2GHz i7,16GB RAM

XCode 7.2 (7C68)

模拟 iPhone iOS 9.2 (13C75)

很高兴提供更多信息,不知道还有什么有用的。

【问题讨论】:

    标签: ios iphone xcode automator xcode-instruments


    【解决方案1】:

    我的同事想通了;在保存模板之前删除自动化仪器中的 DTrace 工具。

    不崩溃,仍然保存日志,快乐时光。

    【讨论】:

      猜你喜欢
      • 2015-04-13
      • 2018-03-07
      • 2013-06-06
      • 2016-02-21
      • 1970-01-01
      • 1970-01-01
      • 2018-10-01
      • 2017-01-24
      • 2020-07-01
      相关资源
      最近更新 更多