菜鸟教程小白 发表于 2022-12-11 17:49:49

android - 我们如何测试移动应用程序(android 和 IOS)的性能


                                            <p><p>我需要测试一个移动应用程序的性能。<br/>
我已经使用 jmeter 工具来测试它的服务和 API,但我们也想测试它在设备中的性能。是否有任何工具可以用来测试移动应用程序的性能。 </p>

<p>首选可以帮助两个应用程序(即 android 和 IOS)的单一开源工具。 </p>

<p>如果有其他方法,我们也可以测试应用程序的性能。</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p> <a href="https://github.com/yandex/yandex-tank/" rel="noreferrer noopener nofollow">Yandex.Tank</a>有一个 appium 插件(在性能测试之前启动 appium,在测试结束后停止)和 <a href="http://yandextank.readthedocs.io/en/latest/core_and_modules.html#bfg" rel="noreferrer noopener nofollow">BFG</a>可以运行 Python 场景的插件(这里是一个简单的 <a href="https://gist.github.com/direvius/e38f8cec40e5b61b36753ef4edd5373b" rel="noreferrer noopener nofollow">example</a> )作为负载测试。您还可以对 <a href="https://github.com/xiaocong/uiautomator" rel="noreferrer noopener nofollow">UIautomator</a> 使用 python 绑定(bind)。而不是脚本中的 Appium。您可以使用 <a href="https://overload.yandex.net" rel="noreferrer noopener nofollow">Overload</a>分析您的测试结果。可以使用 <a href="http://yandextank.readthedocs.io/en/latest/core_and_modules.html#telegraf" rel="noreferrer noopener nofollow">Telegraf</a> 收集监控指标插件使用带有 <code>adb</code> 命令的自定义配置来读取手机上的 <code>/proc</code> 文件系统。例如:</p>

<pre><code>    &lt;Monitoring&gt;
      &lt;Host address=&#34;localhost&#34; interval=&#34;1&#34;&gt;
      &lt;Custom measure=&#34;call&#34; label=&#34;memory&#34;&gt;adb shell &#39;grep MemFree /proc/meminfo&#39; | awk &#39;{print $2}&#39;&lt;/Custom&gt;
      &lt;Custom measure=&#34;call&#34; label=&#34;dsk_data_free&#34;&gt;adb shell dumpsys diskstats | grep Data-Free | sed s/%//g | awk &#39;{print $7}&#39;&lt;/Custom&gt;

      ... etc ...

    &lt;/Monitoring&gt;
</code></pre></p>
                                   
                                                <p style="font-size: 20px;">关于android - 我们如何测试移动应用程序(android 和 IOS)的性能,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/40019171/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/40019171/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: android - 我们如何测试移动应用程序(android 和 IOS)的性能