-1

Is it possible to record http/https requests from an android device with 3G on JMeter proxy?

We have a client-server application. Server is a web application residing on a remote PC. Client is an android application that runs on android device and interacts with Server.

When the android user is in travelling the client application will keep sending the current locations using google map/GPS to the server. This is used by server for continuous tracking of the clients.

I need to perform a load testing for this scenario. That is what will be the performance of the server when it has to track 1000 android client app users for a long distance(up to 20 - 30 Kilo meters)

I am able to record this load test scenario using JMeter proxy uisng WiFi connection. But not with 3G connection. With WIFI we can record the tracking only up to 100 meters. So, for beyond 100 meters or longer distance we need to use 3G.

JMeter proxy settings in android device works fine for WiFi connection but not for 3G data connection.

I have changed proxy settings in APN settings for 3G. But, it did not work. I already searched in google and found below links about changing proxy settings in APN settings but they did not work.

http://www.techverse.net/how-to-setup-proxy-server-3g-4g-data-connection-android-phone/

https://sebastian.expert/changing-proxy-settings-for-3g-mobile-data-in-android-without-root/

Please help. BTW, the 3G connections used are Airtel and IDEA.

Chaitanya K
  • 71
  • 2
  • 2
  • 5
  • Why are you recording from different locations? Are you serving different content to local vs remote users? If you are serving the same content, recording from 3G will give you the exact same script as recording locally over WiFi! – RaGe Apr 25 '15 at 17:09

2 Answers2

0

Out of interest, why do you need to simulate clients from different locations? In load testing world functional checks are mostly omitted in favor of performance. However here are possible options:

I doubt that machine running JMeter is available over the Internet, my expectation is that you're sitting behind of NAT so mobile device cannot resolve what you set in Android APN settings. Contact your IT team, maybe they could help you in setting up a VPN connection.

If you're looking for a way of simulating network bandwidth slower than WiFi you can add the following lines to user.properties file (the file is located in /bin folder of JMeter installation)

  • httpclient.socket.http.cps=1843200 - for 3G
  • httpclient.socket.http.cps=19200000 - for 4G

See Controlling Bandwidth in JMeter to simulate different networks and Apache JMeter Properties Customization Guide for more information and options.

If you target to impersonate users from different locations, recording test from different locations isn't a very smart solution. I would rather go for the following:

  • Inspect recorded requests. I'm pretty much sure that client's coordinates are being passed somehow
  • Locate parameters for client's latitude and longitude and substitute them with __Random() function. You can set minimum and maximum values there to limit range to geo region where IDEA and Airtel have coverage.
Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • Thanks. Your suggestions will be helpful. I will follow them. – Chaitanya K Apr 25 '15 at 10:30
  • @Dmitri.Thanks. Your suggestions will be helpful. I will follow them. Just FYI, Actually, I am not simulating clients from different locations. I am trying to simulate/record one complete client tracking by the server. I want to record the tracking of one client from it's source to destination. Using this recorded tracking requests/responses, I want to simulate the load of 1000 trackings on the server. Anyway, Will try your below suggestions. - Use of _Random() + Parameterization - Changing of bandwidths in user properties file. – Chaitanya K Apr 25 '15 at 10:47
0

JMeter proxy settings in android device works fine for WiFi connection but not for 3G data connection.

I fail to see why you would need to record from a remote client as I said in my comments above. Unless if you're specifically serving different content to local vs remote users, you will see the same JMeter script whether you record locally or over 3G. You may be confusing recording from different network locations with running a test from different network locations.

But if you still need to reach JMeter proxy over 3G, for some reason:

Your JMeter proxy is not reachable over 3G because your JMeter proxy IP is likely a local IP and not a public one. If you're doing this in a NATed network, you need to set up port forwarding on your external facing network device to be able to reach the server running JMeter proxy.

RaGe
  • 22,696
  • 11
  • 72
  • 104
  • @RaGe.Thanks for your suggestions. I will try them. As I mentioned in the below comments to Dmitri, my intention is not to record from different locations. I am trying to simulate/record one complete client tracking by the server. I want to record the tracking of one client from it's source to destination. Using this recorded tracking requests/responses, I want to simulate the load of 1000 trackings on the server. Hope this clarifies your questions – Chaitanya K Apr 26 '15 at 10:32
  • Then why not do this entirely on Wi-Fi, why go on 3G? – RaGe Apr 26 '15 at 11:36