<img alt="" src="https://secure.leadforensics.com/150446.png " style="display:none;">
Go to top icon

Fiddler for Mobile Application Testing

Surabhi Deshpande Dec 31, 2015

Testing mobile testing Technology

If you are from the software industry, chances are that you are already familiar with Fiddler which is used for analytics and debugging purposes. The tool offers powerful capabilities to capture traffic from almost any device. In this post, I have written about the use of Fiddler for mobile application testing.

Some key features of Fiddler:

Fiddler is a web debugging and data monitoring tool. Since this is a proxy tool, it can debug traffic from user machine, MAC system and mobile devices. You can use it to debug traffic from any application that supports Internet explorer, Opera, Firefox, Chrome, Safari or other browsers. It supports frameworks such as .NET, Java and Ruby, among others.

fiddler.png

How to capture traffic from mobiles (Android and iOS):

  1. Install Fiddler on your computer (desktop).
  2. Go to Tools –> Fiddler Options -> Connections and tick the checkbox for ‘Allow remote computers to connect’.
  3. On the mobile device, hit this URL in any browser http://ipv4.fiddler:8888/
  4. Click on the link - Fiddler Root Certificate - and install it on the mobile device.
  5. To configure device to use proxy, go to settings -> select Wi-Fi.
  6. For Android devices, tap and hold the network that is connected. Select modify network from popup. Check mark the advanced option. Change Proxy setting to manual and add your computer's IP address in proxy hostname and proxy port set to 8888.
  7. For iOS devices, select the network that currently connected. In HTTP proxy section, select the manual option and set server to your computer's IP address and port to 8888.
  8. You can now see your application’s traffic on Fiddler.

Use of fiddler:

  1. Request/response check: - Once you see the traffic in the web session pane of Fiddler, you can see request-response of different web services used in the application through the Inspector tab on the right hand side pane. It shows different inspectors such as JSON, XML. We can choose any of the inspectors to view data. The user can also view any bottleneck in request or response and track the issue.
  2. Comparison of two sessions: - We can compare two sessions to see the difference. Select two sessions from the session pane, right click and choose the compare option. Fiddler uses the WinDiff tool to show comparisons. We can manually change it in the registry.
  3. Generate Request: - The Compose tab of Fiddler can be used for this purpose. The user can generate request for application and execute it to see the response. The user can also save a session or its request/response and re-execute it for other purposes.
  4. API Testing: - Web APIs can be tested by using the APITest extension of Fiddler. The APITest tab can be accessed by clicking on - View->Tabs->APITest. It shows a list of tests containing API request and validators. Validators provide information about success and failure of test performed.
  5. Statistics and timeline of session: - The statistics tab shows overall performance metrics of selected session. It gives the number of request, sent and received bytes through sessions. Response bytes can be seen by content types or pie charts. Fiddler gives you information about the files used for generation of page in the selected session.

Timeline provides the start time of the session and total time of execution. You can use this information in performance analysis and to identify relation between numbers of requests. We can easily recognize slow requests and their execution times. Network performance can be optimized by using statistics and timeline charts.

These are some of the ways Fiddler can utilized for mobile application testing. Have questions? Feel free to post in the comments below.

References:

http://www.telerik.com/fiddler

https://en.wikipedia.org/wiki/Fiddler_(software)

e-Zest is a leading digital innovation partner for enterprises and technology companies that utilizes emerging technologies for creating engaging customers experiences. Being a customer-focused and technology-driven company, it always helps clients in crafting holistic business value for their software development efforts. It offers software development and consulting services for cloud computing, enterprise mobility, big data and analytics, user experience and digital commerce.