0
votes

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.

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.

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

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

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

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.

1

1 Answers

0
votes

As per Recording Using Android Devices article:

  1. Make sure that there are following entries in your 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. Add the following line to <application> section:

    android:networkSecurityConfig="@xml/network_security_config"
    
  3. 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>
    
  4. Compile your application in Debug mode

More information: Network security configuration


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