【问题标题】:Jmeter is not able to record steps of https sites on a mobile app(hybrid)Jmeter 无法在移动应用程序(混合)上记录 https 站点的步骤
【发布时间】:2019-11-30 07:04:37
【问题描述】:

我使用的是 Jmeter 5.1.1 版并完成了所有设置,例如在我的三星 Galaxy TAB 中安装 RootCA 证书、在 TAB 中设置代理以及在同一 WiFi 网络上安装笔记本电脑和 TAB。

但在 https 网站上为特定移动应用(混合)执行操作时无法记录步骤。虽然在 http 站点上完成了相同的场景,但它成功记录了步骤。

当我们使用 Jmeter 在 https 站点上登录应用程序时,应用程序卡住了。

我已遵循 Jmeter with Mobile App(Hybrid) 的基本标准。

预期结果 - 记录应作为测试步骤存储在 Jmeter 中,而我们在 https 网站上为移动应用程序(混合)执行相同操作。

实际结果 - 记录没有存储在 Jmeter 中,而我们在 https 网站上为移动应用程序(混合)做了同样的事情并卡在登录页面上。

【问题讨论】:

    标签: jmeter performance-testing


    【解决方案1】:

    根据Recording Using Android Devices article

    1. 确保您的application manifest 中有以下条目:

      <uses-permission android:name=“android.permission.INTERNET”/>
      <uses-permission android:name=“android.permission.ACCESS_NETWORK_STATE” />
      <uses-permission android:name=“android.permission.ACCESS_WIFI_STATE”/>
      
    2. 将以下行添加到&lt;application&gt; 部分:

      android:networkSecurityConfig="@xml/network_security_config"
      
    3. base/src/{packageMain}/res文件夹下创建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>
      
    4. Debug模式下编译你的应用程序

    更多信息:Network security configuration


    如果您无权访问应用程序源,您要么必须 root 设备才能安装系统级 MITM 证书,要么使用 Android Emulator

    【讨论】:

      猜你喜欢
      • 2015-01-29
      • 1970-01-01
      • 1970-01-01
      • 2017-05-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多