3
votes

I am trying to test mobile application using jmeter Test Script Recorder but When i set proxy in my mobile and then I tried to captured, It shows all the time "No internet connection". I have set correct ip and port number. Can anyone help me ?

1

1 Answers

2
votes

There is more than one mobile operating system and troubleshooting options differ depending on vendor and OS.

  • Double check that you actually started HTTP(S) Test Script Recorder and there are no modal dialogs with warnings/errors and nothing suspicious in jmeter.log file
  • JMeter itself must have internet connectivity, if your machine is behind the corporate proxy - you will need to apply some extra configuration
  • Check if you can record anything using web browser on mobile device. Start with HTTP-based simple site i.e. http://example.com
  • If your application is using HTTPS protocol you will need to install JMeter's self-signed certificate onto the device, the file is called ApacheJMeterTemporaryRootCA.crt and it's being generated in "bin" folder of your JMeter installation when you start HTTP(S) Test Script Recorder and you need to transfer it to your device somehow (bluetooth, email, whatever) and follow your OS dialog to get it installed and trusted
  • For certain Android versions you might need to use a 3rd-party tool like ProxyDroid in order to proxy HTTPS traffic
  • For iOS devices you will need to "tell" that you trust JMeter's certificate under Settings -> General -> About -> Certificate Trust Settings

See the following materials for more information:

  • HTTP(S) Test Script Recorder user manual entry (pay attention to HTTPS recording and certificates chapter)
  • Apache JMeter proxy Step-by-step
  • You can consider using a cloud-based proxy service, in this case you will not have to worry about certificates generation and installation and will have confidence that the device will have Internet connectivity. As a bonus you will have possibility to export recorded script in "SmartJMX" mode with automatic detection and correlation of any dynamic parameters.