Did you know we use FiddlerCore inside Test Studio? See how FiddlerCore helps us deliver API, performance, load, web, mobile test automation and testing.
Fiddler is a free web debugging proxy with over three million yearly users. Many of you are quite familiar with it, but what a lot of people don’t know is that Fiddler is the superset of “FiddlerCore,” “FiddlerScript, “Fiddler Extensions” and “Fiddler Inspectors.” In this post I want to talk about “FiddlerCore” and how we use it inside Test Studio.
FiddlerCore is described in detail on our website, so take a look if you are interested in the details. What I’ll tell you is the short version – Fiddler Core is a Web Proxy. Of course it can do more than that, but at its most basic, it is a proxy engine and you can use it to build your own application on top of it. This is what we’ve done in Test Studio, our automated testing solution. We use it in multiple features to:
- Capture Traffic for Load test sessions
- Capture Traffic for API tests
- Examine Traffic for Performance Tests
- Automate Mobile browsers
In the first two cases the usage is straightforward. Test Studio, with the help of FiddlerCore, captures the user’s session, then strips down some of the “garbage” that is not needed. From there the user can further alter the requests – add or change headers, cookies, body content, etc. You may say this is something that any web proxy can do. I suppose this is true, but FiddlerCore does much more and this is why we chose it, especially for the other two cases.
In Test Studio there is a special type of run where the tool captures all relevant network traffic plus the performance counters of the server machine. The results looks like this:
When the performance counters are added the detailed view looks like this:
What this report shows is not only how much time the request took but also what is the strain on the machine. FiddlerCore saved us a lot of development time for this feature and gave us more detailed reports.
Mobile Web Testing
The story here is even more interesting. What we had a requirement at the time that went like this: “As a QA I want to be able to record and playback web content on any device.” The main problem here is that in general the mobile versions of the most common browsers – Safari and Chrome – do not support extensions. One of the first ideas we had was to force the developers to “instrument” their web apps with a “testing extension.” This idea was quickly dropped because in most cases nobody wants “testing” code in their production environment, and sometimes the development process is black-boxed, and QAs do not have direct access to the code-base.
The solution was FiddlerCore. All the device’s traffic will be rerouted via FiddlerCore's proxy which was fine-tuned to inject the extension in particular requests. This approach turned the browser into a viable automation agent. It proved to be very useful, in fact any device or browser that is rerouted via the FiddlerCore can be automated.
Building great software is not an easy task, but with the right tools at your disposal things happen a bit more smoothly. FiddlerCore gave us the solid foundation to build great Test Studio features. Thank you, Fiddler!
Click the links below to learn more about Fiddler, FiddlerCore and Test Studio.
Fiddler FiddlerCore Test Studio