0
votes

I am trying to record mobile traffic through jmeter but not getting success. Can anyone please help. Steps followed as below:

  1. In JMeter added recording template and Setting port to 9090 in recorder
  2. In mobile below configuration done

Change wifi with the below setting: Proxy mode set to manual Given hostname = localhost (laptop) ip address Port = 8888 Installed JMeter security certificate and verified it under trusted credential in mobile

  1. Starting recording in JMeter
  2. Launching any site i.e. google on mobile
  3. Getting error “You are offline”
1

1 Answers

0
votes

The ports must match, given you Setting port to 9090 in recorder you need to use the port 9090 in your mobile device network proxy configuration.

Also if you're running Android 6.0 or higher you will need to take some extra steps in order to be able to intercept secure traffic like:

  1. In application element of your app manifest add the next line:

    android:networkSecurityConfig="@xml/network_security_config"
    
  2. Create network_security_config.xml file under your app resources folder and put the following code there:

    <?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>
    
  3. Build your application in debug mode

    gradlew assembleDebug
    
  4. Install the .apk onto your device

  5. That's it, you should be able to record now

More information: