我在cmd生产线上运行Instruments 4.3时遇到问题。我相信它正在使用我的4.2版本,这个版本还在安装中。如何让Instruments4.3安装并启动我的应用程序,然后对其运行UIAutomation?
发布于 2012-05-15 11:42:12
问题是你指定了-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参数,它应该可以正常工作。
发布于 2012-04-25 05:10:21
我想我已经弄明白了,但我还是有问题。我从preferences -> Downloads安装了命令行工具
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 cmd行工具,因为我还将我的/Developer文件夹从PATH中移出。我一直在卖"Instruments Usage Error : Device failed to ready to use“。那是怎么回事?
发布于 2012-04-25 03:10:48
你试过了吗:/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/MacOS/Instruments
这个怎么样:/Applications/Xcode.app//Contents/Developer/usr/bin/instruments
https://stackoverflow.com/questions/10304423
复制相似问题