【发布时间】:2019-11-13 12:35:34
【问题描述】:
我需要使用 JMeter 对 Android 应用进行负载测试
请帮忙解决这个问题
【问题讨论】:
标签: performance jmeter blazemeter
我需要使用 JMeter 对 Android 应用进行负载测试
请帮忙解决这个问题
【问题讨论】:
标签: performance jmeter blazemeter
如果您尝试使用 Android >= 7.0 (Nougat) 记录您的移动设备网络流量,您需要执行一些额外的步骤来配置您的应用程序以使用 JMeter 的证书:
在您的应用程序manifest file 中将以下行添加到<application> tag
android:networkSecurityConfig="@xml/network_security_config"
在您的应用程序的res folder 下创建文件network_security_config.xml 并输入以下代码:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<debug-overrides>
<trust-anchors>
<!-- Trust user added CAs while debuggable only -->
<certificates src="user"/>
</trust-anchors>
</debug-overrides>
</network-security-config>
在debug mode 中构建您的应用程序
gradlew assembleDebug
如果您无权访问您的应用程序源,则必须将您的设备 root,convert JMeter's certificate into PEM format using OpenSSL and copy it to Android OS trusted certificates area using ADB。
【讨论】: