Reputation: 115
I am trying to record the native app performance testing by using jmeter HTTP(S) Test Script Recorder and after installing ApacheJMeterRootCA certificate in mobile device and also configuring Proxy settings, I am getting certificate_unknown error whenever I open the app and try to use it
Note : JDK8 and JMeter 4.0 is used
Upvotes: 1
Views: 2413
Reputation: 168197
Assuming correct JMeter configuration (i.e. you have imported JMeter's self-signed certificate onto device and the device proxy configuration matches HTTP(S) Test Script Recorder settings) you should be able to record your application traffic normally.
Unless you're using latest Android versions (Nougat 7 or higher) where you need to amend your application source code in order to configure the application to trust user certificates.
Add the next line to your application manifest (under application
tag)
android:networkSecurityConfig="@xml/network_security_config"
Add network_security_config.xml
file under res
folder of your application and put the following code into it:
<?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>
More information:
Upvotes: 4