菜鸟教程小白 发表于 2022-12-13 05:07:07

ios - 使用 Instruments 通过 SSH 启动自动化测试


                                            <p><p>我目前正在尝试从 CI 服务器运行 iOS 移动功能测试。让您知道我正在使用 Calabash 框架,但我的问题与 Instruments 相关: Instruments 没有启动请求的设备。</p>

<p>当我直接从服务器上的终端使用 Instruments 时,一切正常(例如 <code>Instruments -w "iPhone 5s (8.1 Simulator)"</code>)。我收到以下消息:</p>

<blockquote>
<p>Waiting for device to boot...
Instruments Usage Error : No template (-t) specified
instruments, version 6.1 (56160)
usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w &gt; device] [[-p pid] | ]]*</p>
</blockquote>

<p>但是,当我从 SSH 连接启动相同的命令时,它会忽略请求的设备并启动之前使用的设备。而这一次它停留在 <em>Waiting for device to boot...</em></p>

<p>有没有人可以解释这种行为?为什么它可以通过本地 session 而不是远程 ssh 连接工作,以及如何修复它?</p>

<p>我在 OS X Yosemite 上有 6.1 版的 Instruments。</p>

<p>谢谢。</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>好问题,我知道如果正在运行的进程被视为后台或系统任务,它将无法启动仪器并运行测试,因为它需要用户级运行时状态。我在尝试从 cron 作业启动仪器时发现了这一点。当你 ssh 你的 shell 线程可能被认为是系统级的。我唯一的建议是将您的命令放在 shell 脚本中,并以某种方式在用户级线程上调用该脚本。不幸的是,我不是 unix 专家,无法为您提供具体操作方法,希望对您有所帮助。 </p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 使用 Instruments 通过 SSH 启动自动化测试,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/28237749/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/28237749/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 使用 Instruments 通过 SSH 启动自动化测试