仪器多设备执行 [英] Instrument-Multiple device execution

查看:64
本文介绍了仪器多设备执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够使用命令行在单个设备/模拟器上运行仪器,但是我需要在两个设备上运行它.我可以手动打开两个新的Instruments窗口,并制作两个js副本并将其导入,以实现此目的.但是我需要使用命令行来实现.有人可以帮助我实现这一目标吗,或者有人有相同的指导方针吗?

I am able to run instrument using command line for a single device / simulator, but I need to run it on two devices. Manually I can achieve this by opening two new window of Instruments and make two copy of the js and import it. But I need to achieve this using Command Line. Can anybody help me in achieving this or does anybody have the guidelines for the same?

推荐答案

我也为此感到困惑,这也是我解决方案的一部分. 我所做的是:

I struggled with this as well here is a part of my solution. What i did is:

使用预先选择的脚本.js文件在仪器中创建跟踪文件,并将其保存到磁盘.

Create trace files in instruments with you script .js file pre selected and save it to disk.

读取所有已连接设备的UDID. 循环通过所有连接的设备,并将跟踪文件中的UDID替换为当前的UDID. 在同一循环中打开仪器.

Reads the UDID of all connected devices. Loop trough all connected devices and replace the UDID in your trace file with the currenct UDID. In the same loop open instruments.

for line in $(system_profiler SPUSBDataType | sed -n -e '/iPad/,/Serial/p' -e '/iPhone/,/Serial/p' | grep "Serial Number:" | awk -F ": " '{print $2}'); do
  UDID=${line}
  file$x $(replace 345w67ww89ww0w98w762wewq33e2 with ${UDID})
  open -a Instruments /PATH/TO/TRACE/file$x
done

此解决方案将打开仪器"的多个窗口. 您可以使用appleScript浏览它们,然后单击记录"按钮.

This solution will open multiple windows of Instruments. You can go trough them with appleScript to click the record button.

这篇关于仪器多设备执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆