从iPhone模拟器的命令行启动仪器
问题描述:
以下this问题,我如何使用iPhone模拟器作为设备启动instruments。 我尝试这样做:从iPhone模拟器的命令行启动仪器
$ instruments -t /Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -w iphonesimulator5.0 MyApp.app
但我得到这个错误:当你想指定一个硬件设备作为目标(“设备ID”这里
Instruments Usage Error : Device failed to become ready for use.
答
我是这么做的,如下所示: 1.我创建了一个模板,我在其中调用我的UI自动化主文件,该文件触发器运行所有脚本。 EX: //Main.js文件将运行auto.js脚本 //auto.js是在我运行的所有脚本 //Main.js文件 #进口“auto.js” 我的主文件auto.run(); //现在打开终端并运行以下命令。 1.转到您保存模板的目录 2.复制模拟器(完整路径)为 的位置比运行以下命令: instruments -t ./NameOfYourTemplate.tracetemplate/Users/swathyvalluri/Debug-iphonesimulator /MyApp.app
注意:在模板中创建一个新文件,然后将其中的内容复制到您想放置的文件中,否则它将在本地查找Main.js文件,并且在另一个文件上运行时会失败服务器。
请让我知道如果你需要更多的帮助:)这里