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
Related
I am able to test serviceworkers over http with localhost but I would like to testg on a mobile browser. Because it is a separate device I cannot use localhost so I use the name of the PC. So now I need to use https, which is causing SSL related errors in my service worker:
Uncaught (in promise) DOMException: Failed to register a ServiceWorker for scope ('https://xxx:5500/app/') with script ('https://xxx:5500/app/service_worker.js'): An SSL certificate error occurred when fetching the script.
I have properly configured liveServer to use self-signed certs and I've successfully enabled "edge://flags/#unsafely-treat-insecure-origin-as-secure" but it is not enough.
I'm also concerned about how to test PWA on the mobile device as I presume I cannot make use of the "unsafely" feature on mobile. I assume this is a common scenario but I am not finding any answers.
You can test your PWA on mobile via chrome developer tools:
the method called remote debugging (works only for android)
open developer tools in mobile - allow usb debugging
connect via usb to laptop or pc
go to chrome dev tools open remote devices
set port forwarding in remote device
run local host in mobile chrome browser.
for detailed info follow : https://developers.google.com/web/tools/chrome-devtools/remote-debugging
this provides localhost in a mobile devices so no need for https or ssl.
I think this is the best way to test your PWA, I have personally used it.
Another working solution than is to use ngrok which will create a live https-server for the project you want (and then you'll be able to access it on your mobile device)
A very simple solution is to install Termux on your Android phone, then use socat to port-forward from a local port to your development host:
socat tcp-l:8000,fork,reuseaddr tcp:192.168.1.170:8000
This will run in the background while the terminal is open. Then in Chrome you can connect over plain HTTP to http://127.0.0.1:8000 and you should get the "Add x to Home screen" notice.
Works great over the local network and no certs, apps or services needed.
I'm building an app (android + iOS) that needs to be able to reach an API Endpoint through a https proxy.
The development environment is Android Studio + Xcode + macOS.
My development path is:
Reach the endponit using android emulator settings.
Reach the endpoint using real andorid device settings.
Reach the endpoint using inapp solution implenting the https proxy connection management inside the app.
Since I'm at the first point, my problem is that I'm not able to setup the Android emulator with the https proxy.
(For iOS app, just setting up the mac network preferences is enought)
In Android, I successly set up the http, but not the https.
I have tried setting up the apn at the vitrual device, and running the emulator with -http-proxy.
According to the documentation it includes https proxy, but it still not working.
The debugger saids that the server response is null when calling https. Http redirects to https.
All of those solutions just works for the http, not for the https.
I have also tried whit genymotion with no success.
I have tested the API from my computer (via postman) and it is all ok.
Has anyone been able to successfully access an https proxy from the Android emulator? It's possible? What settings am I omitting?
Thank you so much in advance.
PS: My problem is related with HTTPS, I am able to use HTTP proxy
I have done all the configuration in Jmeter and my Android device. For configuration , I have refereed the below link:-
http://community.blazemeter.com/knowledgebase/articles/186249-load-test-mobile-apps-easily.
The issues is, while performing the steps on the native application (On Android phone) I am not able to capture 'HTTPS' traffic in Jmeter. I also installed the Jmeter certificate on my Android phone. Please help me to resolved above problem.
Note: I am able to capture the HTTP request through Jmeter.
It look like you "referred" the link not very attentively. It states:
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.
For instance it looks like ProxyDroid application does
Support HTTP / HTTPS / SOCKS4 / SOCKS5 proxy
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.
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.