我想要按照this post从命令行在iOS设备上运行UIAutomation脚本,但是我无法使其工作。使用设备上的仪器进行自动化测试
这是我目前正在使用的命令: 文书-t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate /用户/ X/Library/Developer/Xcode/DerivedData/TestiPhoneAutomation2-dyufpxsavtdqkybpagcoawdudzid/Build/Products/Debug-iphoneos/TestiPhoneAutomation2.app -e UIASCRIPT“/Users/X/Workspaces/TestiPhoneAutomation/test2.js”-e UIARESULTSPATH“/ Users/X/Workspaces/TestiPhoneAutomation2 /“-w 80bf5b ... UDID ... dfb52543 -v
它在模拟器上运行良好(用debug-iphonesimulator替换Debug-iphoneos,在这种情况下它也忽略-w),但如果我启动它使用为设备编译的应用程序它崩溃(我与r尝试elease和调试,我得到相同的结果)。
我得到的错误是:
POSIX产卵故障;放弃发射(二进制== /Users/X/Library/Developer/Xcode/DerivedData/TestiPhoneAutomation2-dyufpxsavtdqkybpagcoawdudzid/Build/Products/Debug-iphoneos/TestiPhoneAutomation2.app/TestiPhoneAutomation2)。 2012-10-03 12:10:36.609乐器[76151:1603]录制取消: 至少有一个目标无法启动;中止运行仪器跟踪 错误:无法启动跟踪。
谢谢,这工作正常...,我使用相同的命令,但“-w udid”位置不同。把它放在tracetemplate之后和应用程序名称之前对我来说非常棒 –