Mobile Application Testing With Jmeter - android

In our organization we are using Proxy to connect mobile devices with Internet.
Can anyone please help to configure mobile device to work with Jmeter.
As my understanding we have to configure Jmeter Proxy into mobile device to work with,But if i ma configuring that into mobile my internet will stop working.

Ideally you will be using a test mobile device, rather than an active mobile on a real live account.
However, the Jmeter Proxy should be configured to point at your current proxy. It is inserted into a chain, rather than replacing the chain. Therefore your mobile internet should continue to work as long as the jmeter proxy is running.
Here is the official guide to setting up Jmeter Proxy:
http://jmeter.apache.org/usermanual/jmeter_proxy_step_by_step.pdf
If using a test device/account is not an option, then you will need to switch the proxy on the device whenever you want to stop testing and use the device normally. You can probably find an app to make the switch easier.

Your mobile devices can be configured to use JMeter proxy server. In that way you can record the HTTP requests you send to the server.
I had a similar issue. This post clarifies it.
JMeter recording iOS native application that uses HTTPS leads to SSL handshake issue

I've done it successfully. For that you"ve to use ApacheJMeterTemporaryRootCA file on your device.

Related

Unable to make local network calls using IP address on deployed react native app

My react-native android app uses the IP address of a smart device on the local network to communicate with it. This works perfectly in testing but now that I've launched the app for internal testing this call fails.
Ex call is: http://192.168.88.39:8080/version
This call works perfectly in development, but not on the deployed app. I was previously using a hostname to resolve the IP address of the device on the local network but realized this didn't work with Android, so I switched to using the IoT device's IP address to communicate with it.
But to my surprise that isn't working. I've also tried to setup a Charles proxy to intercept the requests but have been unable to do so successfully so I'm not sure what the exact response is from the http request.
But I know it doesn't resolve.
So firstly is this even possible to do? Want to make sure this is not prohibited?
You cannot access http urls in a production build. Check this question for possible solutions Android 8: Cleartext HTTP traffic not permitted

Setting up a proxy for native apps to record HTTPS traffic for performance testing

I am using JMeter to record our native apps for performance testing purpose. I have installed my JMeter certificate to my android device and using android version 5.1.
I have a rooted android device and using proxy droid for forcing all apps to use proxy. Seems like Youtube and playstore is working and I am able to record everything. I am just not able to record anything from my android app. It looks like the internet is somehow not working in my particular app. My app is sending HTTPS Request.
Same Problem with IOS.
I have also used Blazemeter but same problem with it.
1) What should I do to make it work?
2) What should I tell to developer to make that app work with proxy setting?
JMeter can only record HTTP and HTTPS traffic with its HTTP(S) Test Script Recorder, the fact you can capture the traffic from Youtube and Play store indicates the fact that your JMeter configuration is correct, most probably your application uses a different protocol for communication and you should talk to the developer and learn which protocol(s) are in scope and investigate if there is a load testing tool available in the market which supports record and replaying of this protocol traffic.
As a last resort you can capture "raw" traffic using a sniffer tool like Wireshark and replay it with HTTP Raw Request JMeter plugin but this way you won't be able to perform correlations, assertions, and so on.
When I set up the Proxy in my mobile device and after installing the certificate, I was not able to connect to the Internet. I tried multiple options but it wasn't allowing me to record traffic. After some research I got the solution and it is simple.
For iOS follow below steps after setting up the Proxy on your mobile device to get Internet connection and record Traffic:
Step 1: Click on Settings
Step 2: Select General
Step 3: Select About
Step 4: Certificate Trust Settings
Step 5: Enable CA Certificate you downloaded from JMeter
That's it. Try to access Internet on your mobile after clicking on the Start option on Jmeter HTTPS Test Script Recorder. You will see your traffic is getting recorded.
If you are still facing problems, please reach out to me.

unable to connect to jmeter proxy with android 4.4.2

I am connecting the android device to jmeter 2.12 using HTTP Test script recorder and also configured the host ip in wifi. but when i am launching the url in browser of android device it says Unable to connect to proxy. Can we actually load test the hybrid android application which are sending https request with jmeter. please suggest
As per Load Testing Mobile Apps. But Made Easy. guide
Note that Android supports only HTTP proxy. If your application uses an HTTPS connection, then you may use an additional application that performs with HTTPS proxing
So if you need to record HTTPS traffic I think that you need to install an application which can proxy HTTPS, for instance ProxyDroid

Apps are unable to access internet in Android Device with Proxy

I have a requirement of doing Performance Testing of Android apps as given here [http://blazemeter.com/blog/load-testing-mobile-apps-made-easy] . But when I change the proxy hostname of my Android device to that of my laptop's IP, the apps are unable to access the internet. Though, the browser works fine and are able to send the requests. It is getting recorded in JMeter as well. But, the apps are unable to access the internet. Is it because they don't have the permission to access the internet because of the changed proxy?
A main reason that the apps won't work but the browser will, is the use of https.
If you are using the secure protocol in your applications, they don't know how to retrieve the certificate through the proxy, but the browser does. You will have to get the certificate yourself, and put it on the phone.
As is written in the article you mentioned:
Note that Android supports only HTTP proxy. If your application uses
an HTTPS connection, then you may use an additional application that
performs with HTTPS proxing.

Using Fiddler2 HTTP request inspector with an Android device

For a project working I need to inspect the HTTP requests sent and received from my Android device. I'm using this tool Fiddler2 to monitor the traffic. In order to get it working I had to pass the traffic through a proxy. Now my phone is a Huawei U8180. Its runs Android 2.2 so it doesn't have a direct way to proxy settings. I used this app called Proxy Settings to gain access to set the proxy settings.
It almost works. I can see the traffic say, if I navigate to a website using the proxy web browser in that app (The app comes with a proxy browser). But not using my phone's normal browser. Neither I can see any HTTP requests sent by any of my apps installed in my device.
If anyone has any experience using Fiddler2 with Android, I'd really appreciate your input. I'm open to try any other alternatives to accomplish this if you got any.
Thanks.
Typically, Android users will use a tool like iptables to capture traffic from apps that don't support a proxy setting. This has some implications for HTTPS decryption; see the Fiddler Discussion Group (Help > Fiddler Community) for discussion of how to adjust Fiddler's HTTPS settings to accommodate iptables-redirected HTTPS connections.

Categories

Resources