Not able to record native app traffic in jmeter with https protocol

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Not able to record native app traffic in jmeter with https protocol

Pravesh Prajapati
I have to test the performance of my mobile app with Jmeter. When I
configured my laptop with the mobile device, I have lost my internet
access. Can you please help me to fix this problem?

Followed the below steps:
1. Installed Jmeter Certificate on my mobile
2. Connected wifi data
3. I have configured the host name and port in Mobile Additional Settings
4. Clicked on the Start button from Recorder(Jmeter)
5. Internet connection gets lost

Note : I am using Redmi Note 4 android mobile for testing.

Please help to resolve the issue.
Protocol used in application is https


--
Regards,
Pravesh prajapati.
Mob:-9702600170
Reply | Threaded
Open this post in threaded view
|

Re: Not able to record native app traffic in jmeter with https protocol

glinius@live.com
Be informed that in case of  Android >= 7.0 Nougat
<https://en.wikipedia.org/wiki/Android_version_history#Android_7.0_Nougat_(API_24)>  
you need to perform extra steps in order to be able to record HTTPS traffic
via JMeters MITM certificate 1. Add the following line to the  application
<https://developer.android.com/guide/topics/manifest/application-element>  
element in your Android application  manifest file
<https://developer.android.com/guide/topics/manifest/manifest-intro>  
> android:networkSecurityConfig="@xml/network_security_config"

 2.  create file `network_security_config.xml` under  res folder
<https://developer.android.com/guide/topics/resources/providing-resources>  
of your application and put the following code inside it:<?xml version="1.0"
encoding="utf-8"?>                                                 3.
Re-compile your application in  debug flavour
<https://developer.android.com/studio/build/building-cmdline#DebugMode>  
> gradlew assembleDebug

4. Replace the application on the device with the newly build debug version
- this one you can record with JMeter. If you don't have access to your
application sources you will have to root your device,  convert JMeter's
certificate into PEM format using OpenSSL and copy it to Android OS trusted
certificates area using ADB
<https://blog.jeroenhd.nl/article/android-7-nougat-and-certificate-authorities>
More information: Recording Using Android Devices
<https://guide.blazemeter.com/hc/en-us/articles/360000285357-Recording-Using-Android-Devices-Recording-Using-Android-Devices>  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html