Introduction
The scope of this article is how fiddler can be used to do load or stress testing for a client-server-based application. Fiddler is a web debugging proxy tool that captures outgoing http/https traffic from a system(client application), that captured traffic can be used for further inspection like request, response and request statistic like time taken for the response, size of the response and lot more about the outing request from a client system. Fiddler is not designed to be used as a tool for load testing, however with a little customization we can extend this tool to perform load testing. In the next section I will explain why someone can consider fiddler for load testing though it's not specifically meant for that purpose.
Why Use Fiddler for Load Testing?
There are lots of tools available specifically for load testing like load runner JMeter etc, then why use fiddler for load testing? Tools which are mostly designed for load testing require specific skilled resources to set up the test scripts and run them. So, in cases where we don't have this kind of tool, infrastructure, and the skills required to set up test script and run it, then with Fiddler can be used with little setup, without any specialized experience of doing load testing.
Apart from that setting up infrastructure and specialized teams to perform load testing with those tools involves time and cost, which can be avoided when time and cost is a factor to be considered. As Fiddler is a free tool and the approach of load testing with Fiddler does not need any specialized team to prepare load test script and run it, this can be used to save time to prepare for load testing and also the investment towards having an infrastructure and skilled resources. In my experience time was the factor when we thought of doing load testing for our application, as ETA was more to setup a load testing with those standard tools and we started looking for an alternative where we don’t have specialized resources and tools.
What do you need for load testing with Fiddler?
- Download and Install Fiddler in Client system (user system where application runs). Fiddler is free to download and install
- Basic knowledge of capturing a fiddler session and saving those sessions as .SAZ files. Fiddler sessions are the outgoing http/https request when you perform certain use case in your application keeping fiddler on.
- Fiddler sessions (.SAZ files) for use cases for which load testing will be done. These are the use cases frequently performed by users in production.
- Custom Fiddler script to generate load and capture results (scripts will be attached)
- Instructions to perform load testing
I will share more details on the above in subsequent sections of this article.
Approach of Load Testing with Fiddler
Basic idea is to capture out going http/https requests of frequent use cases for your application and replay those sessions in a certain interval within a load testing window. Custom Fiddler script will help in replaying captured sessions in a certain interval in order to simulate load for that session from .saz file. This way multiple .saz files which correspond to your load test use cases can be captured and run from multiple instances of Fiddler to generate load.
In order to generate a huge load one personal computer may not be enough, and in that case .saz files can be distributed among a group within a team and perform this test together from multiple PCs. At the end of the testing all simulated requests can be seen in fiddler instances whether requests are successful or failed. In our case we just generated the load using fiddler and checked performance results in Dynatrace (any application monitoring tool can be used) during the test window. In case you don’t have any application monitoring tool to check the health of your application under load testing, you may further customize the script using Fiddler API to generate a detailed report containing the number of requests made, number of failed requests, avg/median response time for a particular request. We haven’t implemented detailed test result generation, in case you feel it is required, you may contact me for any guidance on further extending this script.
Download and installation of fiddler is simple and does not require any specific instructions to be considered. Once you install and fiddler is ready to capture your application traffic and you have basic knowledge of how to capture sessions for your application, we can proceed further with the steps required to perform load testing. For those who are not familiar with Fiddler, I will quickly explain how fiddler can be used to capture sessions for an application use case.
Basic knowledge to capture a Fiddler Session
For the purpose of not getting diverted from the actual topic, I will limit this to just how a .saz file can be captured for an application use case. Capturing outgoing traffic from a system is very easy, it only needs you to run fiddler and you will see all out going traffic from your system, as shown below in the screenshot

By default, Fiddler will capture all out going traffic from the system, it will include any application that is making an outgoing request and the captured sessions will include everything. In order to just capture outgoing requests for your application use case, you can use host filter mentioning your application root url and remove all captured sessions. Say your application root url is www.xyz.com, then you can set the host filter and remove all previously captured sessions like below in the screenshot

Now once you have the host filter for your application and have cleared all your previously captured sessions, you can start your application, now it will show only outgoing requests from your application. This way fiddler will now show the outgoing traffic only for the use case you are performing in your application. Once you are done with the use case, click on File->Save->All Sessions. This will save all sessions for your use case in .saz file (refer to below screenshot). Make sure before saving the session, it only has requests for your application.


Join the conversation! Your thoughts help the community grow.