从cmd行运行仪器4.3?
问题描述:
我无法从cmd行运行Instruments 4.3。我相信它正在采用我的旧4.2版本,它仍然安装。我如何获得仪器4.3安装和启动我的应用程序,然后运行UIAutomation反对它?从cmd行运行仪器4.3?
答
问题是,您正在指定-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
如果你真的试图在设备上运行此脚本的自动化,那么你就可以迅速使用this script I wrote抢设备ID。将该ID输入到-w
参数中,它应该可以正常工作。
答
你尝试:/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/MacOS/Instruments
如何: /Applications/Xcode.app//Contents/Developer/usr/bin/instruments
答
我想我想通了这一点,但我仍然有问题。我从喜好安装命令行工具 - >下载并运行
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
我敢肯定,这拾起的工具CMD线工具,因为我目前的版本我也将我的/ Developer文件夹移出了我的PATH。我卖的是不断收到:“仪器使用错误:设备无法使用。”那么是什么给了?
真棒剧本! – Cliff 2012-05-15 21:36:53
工程就像一个魅力!再次感谢! – Cliff 2012-05-16 03:48:15