Network not available showing for android app jmeter - jmeter

I am creating jmeter load test script for native android app. So i set manual proxy for WIFI in my android device. PORT set 8080 for both device and jmeter. When i started recoding then its recording device browser actions but not recording native app action. Its showing error like "Internet not available". I have installed jmeter certificate too in the device. So how i can create jmeter script for native android app?

Not sure if this gonna help you but you can look into it once, i face similar issue while recording from Mozilla by adding proxy manually. After i change the port number which i kept same with Jmeter, it started recording. Its the port as per my knowledge and change it to more of less known port from 8080 to 8089 in both Jmeter n in ur Android mobile.
Check below link, hope it helps:
load-testing-mobile-apps-made-easy

Related

Jmeter: Mobile Internet not working after configuring with system's IP & port as per Recording Controller

I am trying to do performance testing of an android app. I have initiated the steps by adding a recording controller, put a port number, used the manual proxy on mobile as per the system's IP but when I try to use the browser, I cannot access the internet. It says no connectivity. I have installed Jmeterrootca certificate as well. Any suggestions folks?
Why would you need the browser if you need to capture the network footprint of the other application?
When you set JMeter's HTTP(S) Test Script Recorder as the proxy for the whole operating system you need to ensure that JMeter is capable of reaching the Internet (or at least the backend for the application which traffic you want to simulate). Check if you can open a web page using JMeter's HTTP Request sampler and if is not successful you will need to fix this first.
You will need to take some extra steps in order to be able to record secure traffic, check out Network security configuration and Configure Android Devices for Proxy Recording articles for more details if needed.

Unable to perform load test of a hybrid mobile app on an Android phone

I am working on designing a load test script for a hybrid Android mobile app. I have performed the following steps but still I am unable to record the network traffic in Jmeter:
Connected my Android phone to my laptop using a USB cable and then copied the certificate file from Jmeter's bin directory to my phone.
Then installed the certificate on my phone.
Then I added manual proxy settings on my phone by setting proxy host name = my ipv4 address, and proxy port = port set on Jmeter.
Then I saved the settings and then tried recording but unfortunately nothing was recorded.
I noticed a very weird thing that on changing the proxy settings on my phone it was no longer connected to the wifi when in fact the internet was working fine on my laptop.
Please note that my phone and my laptop are connected to the same wifi network.
Unfortunately we cannot provide comprehensive answer without seeing:
jmeter.log file
View Results Tree listener results (if any)
logcat of the Android device
So for the time being I can suggest the following checklist:
You didn't start the HTTP(S) Test Script Recorder
The firewall of your operating system is not allowing incoming connections to port "port set on Jmeter"
If you want to have Internet on the Android device make sure that JMeter can connect to the Internet, if you're using the proxy - you need to explicitly configure JMeter to use this proxy
For Android 7.0 and above it's required to take extra steps for recording HTTPS traffic

Apple passes development environment

I am trying to understand how to work with apple passes whilst using localhost. I am using Android Usb debugging so I can visit my website served on localhost from my phone. I have also setup the signing, compressing and installation of the passes.
What I don't understand, is how to debug communications between the installed pass and my server. I don't seem to be receiving requests from the pass once it is installed. Is this because I am using localhost? I inserted localhost as the web service in the pass.json file used to generate the file. My problem is understanding how to debug the problem as I am getting no feedback to work on.
Localhost won't work as the device will view localhost as itself, not as your computer.
To work locally:
connect your phone and computer to the same wireless network
allow http in the developer menu of your iPhone (otherwise the pass will be rejected for not having a https webServiceURL)
use http://computerIp:8080/ as the webServiceURL
serve your web service on your computer on port 8080
For feedback you can view your device logs in Xcode or in the OSX Console application.

Apache Jmeter load testing on Mobile native app failing due to android device losing internet connection while on same network

I am trying to load test mobile app with Apache Jmeter but facing a typical problem. I have done all the required configuration like setting the domain, server name, port in Jmeter. I have also configured my android phone by installing Root CA file, setting the Host name with Jmeter system's IP, port to 8080, IP settings to DHCP, Proxy to Manual but whenever both the system and android device are on the same Wifi network, android device is getting disconnected from the internet and the recording is getting stuck. So can somebody please help me on this.
As per JMeter Bug 59006 since JMeter 3.0 default port for the HTTP(S) Test Script Recorder has been changed to 8888 in order to match the configuration which is being performed via Recording Template so make sure that Android proxy port matches HTTP(S) Test Script Recorder port.
On Android versions after 7.0 (Nougat) you might need to apply extra configuration in your application manifest.
If you don't have possibility to amend application source code - there is a possibility to add JMeter's certificate directly to Android /system/etc/security/cacerts/ file

Charles proxy session export to test

I'm intercepting traffic of my mobile app using charles proxy. I've saved the session as a .chls file. Is there any way to convert this chls into a file which can be readed by jmeter or some other test application?
It would be great if I can build a test case using intercepted data.
And is there some way to export a Postman file to jmeter or similar?
You can use JMeter to capture your mobile traffic. Just
Switch your mobile device to use WiFi connection rather than cellular data
Make sure that your workstation running JMeter and mobile device are under the same subnet
Configure you mobile device to user JMeter's proxy (IP address of your machine and
either port 8080 if you use standalone HTTP(S) Test Script Recorder
or port 8888 if you're using Recording template from File -> Templates menu
For more information and step-by-step configuration instructions see Load Testing Mobile Apps. But Made Easy. guide
If you really want to use Charles Proxy, you can export into HAR format instead. You can then reimport into Gatling with the recorder in HAR mode. Just beware that you might see some additional CONNECT requests over HTTPS, as Charles records traffic from its own standpoint: a proxy.
You can also export in HAR format from tools such as Google Chrome Dev Tool, without this CONNECT requests shortcoming.
Then, you can also use the Recorder in standard proxy mode.

Resources