我无法从 cmd 行运行 Instruments 4.3。我相信它正在使用我仍然安装的旧 4.2 版本。如何让 Instruments 4.3 安装并启动我的应用程序,然后对其运行 UIAutomation?
问问题
2118 次
3 回答
2
问题是您指定了-w
参数但没有提供设备 ID。如果您尝试在模拟器中从您的应用程序运行,那么就不要-w
这样了。
xcrun instruments -v \
-t /Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate \
/Users/cliff/Src/MyApp/build/MyApp/Build/Products/Debug-iphoneos/MyApp.app \
-e UIASCRIPT /Users/cliff/Src/MyApp/UIAutomation/automation-test.js \
-e UIARESULTSPATH /Users/cliff/Src/MyApp/build/uiautomation
如果你真的想在设备上运行这个自动化脚本,那么你可以使用我写的这个脚本快速获取设备 ID 。将该 ID 交给-w
参数,它应该可以正常工作。
于 2012-05-15T03:42:11.843 回答
1
我想我想通了,但我仍然有问题。我从首选项安装命令行工具 - >下载并运行
xcode-select -switch /Applications/Xcode.app/Contents/Developer
然后我跑了:
xcrun instruments -v -t /Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -w /Users/cliff/Src/MyApp/build/MyApp/Build/Products/Debug-iphoneos/MyApp.app -e UIASCRIPT /Users/cliff/Src/MyApp/UIAutomation/automation-test.js -e UIARESULTSPATH /Users/cliff/Src/MyApp/build/uiautomation
我很确定这会选择当前版本的 Instruments 命令行工具,因为我还将 /Developer 文件夹移出 PATH。我不断收到:“仪器使用错误:设备无法准备好使用。” 那么给了什么??
于 2012-04-24T21:10:21.303 回答
0
你试过了吗:/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/MacOS/Instruments
这个怎么样:
/Applications/Xcode.app//Contents/Developer/usr/bin/instruments
于 2012-04-24T19:10:47.960 回答