我想使用 Xcode 机器人在模拟器上运行 UIAutomation 测试。我将此命令添加到在 xcode 的 ARCHIVE 阶段之后启动的过去操作脚本中:
instruments -t "/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate" /Users/ktos/appliation.app -l 10000 -v
Xcode 机器人记录以下错误:
instruments[6702:507] Recording cancelled : At least one target failed to launch; aborting run
Instruments Trace Error : Error Domain=com.apple.instruments Code=1 "Error Starting Recording" UserInfo=0x7fc053b3a310 {NSLocalizedDescription=Error Starting Recording, NSLocalizedRecoverySuggestion=At least one target failed to launch; aborting run}
Instruments Trace Error : Failed to start trace.
当我在终端中使用完全相同的命令时,仪器在同一台计算机上运行模拟器没有任何问题。你知道有什么问题吗?
最佳答案
Instruments 也可能在后台运行。执行 $ps -A 并检查并杀死它。
关于ios - 如何使用 Xcode 机器人在模拟器上运行 UIAutomation - 奇怪的行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20689512/