Jmeter无法在移动应用程序上记录https网站的步骤(混合) [英] Jmeter is not able to record steps of https sites on a mobile app(hybrid)

查看:90
本文介绍了Jmeter无法在移动应用程序上记录https网站的步骤(混合)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Jmeter版本5.1.1,并完成了所有设置,例如在我的Samsung Galaxy TAB中安装RootCA证书,还在TAB中设置代理,并在同一WiFi网络上安装了笔记本电脑和TAB.

I am using Jmeter version 5.1.1 and done all the settings like install RootCA Certificate in my Samsung Galaxy TAB, setting proxy in TAB as well and have laptop and TAB on same WiFi network.

但是在特定的移动应用程序(混合)在https站点上执行操作时无法记录步骤.在http网站上进行了相同的操作后,它成功记录了步骤.

But unable to record steps while performing actions on https site for a particular Mobile App(Hybrid). While the same scenario has been done on http site then it successfully recorded the steps.

当我们使用Jmeter登录到https站点上的应用程序时,应用程序被卡住了.

Application got stuck while we login into the application on https site using Jmeter.

我已经在移动应用程序(Hybrid)中遵循了Jmeter的基本标准.

I have followed the basic standards of Jmeter with Mobile App(Hybrid).

预期结果-记录应该作为测试步骤存储在Jmeter中,而我们在移动应用程序(混合)的https站点上进行了同样的记录.

Expected Result - Recording should get stored in Jmeter as test steps while we done the same on https site for a Mobile App(Hybrid).

实际结果-在移动应用程序(混合)的https站点上进行相同操作并卡在登录页面上时,记录未保存在Jmeter中.

Actual Result - Recording is not getting stored in Jmeter while we done the same on https site for a Mobile App(Hybrid) and get stuck on login page.

推荐答案

按照使用Android设备录制文章:

  1. 确保您的应用清单中有以下条目:

<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"/>

  • 将以下行添加到<application>部分:

    android:networkSecurityConfig="@xml/network_security_config"
    

  • base/src/{packageMain}/res文件夹下创建具有以下内容的network_security_config.xml文件:

  • Create network_security_config.xml file under base/src/{packageMain}/res folder with the following content:

    <?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>
    

  • 调试模式

    更多信息:网络安全配置

    如果您无权访问应用程序源,则必须root您的设备才能安装系统级MITM证书,或者使用

    If you don't have access to application source you will either have to root your device in order to be able to install system-level MITM certificate or use Android Emulator

    这篇关于Jmeter无法在移动应用程序上记录https网站的步骤(混合)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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