Welcome to MSDN Blogs Sign in | Join | Help

Enhanced web test support in Fiddler

If you have ever had trouble recording a web site with the web recorder included in VSTS, then we have probably suggested recording the same site with fiddler and looking for requests that the VSTS recorder did not capture.   If you are not familiar with Fiddler, here is a short description from the fiddler site, “Fiddler is a HTTP Debugging Proxy which logs all HTTP traffic between your computer and the Internet. Fiddler allows you to inspect all HTTP Traffic, set breakpoints, and "fiddle" with incoming or outgoing data.”  The author of fiddler included the ability to save a fiddler recording session to a VSTS .webtest file.  Although the file saved was a valid web test, there were a few problems.

1.    The saved test included all dependent requests such as images, css file, js files, etc.

2.    It included requests that were the results of a redirect.

3.    The test did not correlate any hidden fields for you.  i.e. viewstate

So although you could save a test, it was not saved the same way the VSTS recorder would save it.

I have been working with the owner of Fiddler to add enhanced web test support and he just recently released the updated version of fiddler to the web.  You can get the updated version at http://www.fiddler2.com/fiddler2/.     Here is a list of the new features:

·         Ability to filter out dependent requests

·         Only first request in a redirect chain will be saved.

·         Automatic correlation of view state and event validation fields

·         Plug-in architecture that allows you to write your own custom code that can change how a web test is saved.

I will discuss the last point in detail in a later post.  I will walk through the other changes below.

First I am going to launch fiddler and check to make sure that the version of fiddler is 2.0.8.8 or later.  You can do this by going to Help -> About Fiddler.  After launching fiddler I am going to launch IE and record a simple web test.  The web test will include a script against the IBuySpy web site, which is a sample shopping cart application.  I will add an item to the cart and then complete the purchase.  This set of steps includes 6 different top level requests.  Here is a screen shot from fiddler after recording the script:

As you can see there are many more than the 6 top level requests.  Now I am going to save this test with the old version of fiddler to show you what the resulting web test looks like.  See the below screen shot.  As you can see each of the requests that existed in the fiddler UI are now in the web test.  You would need to modify this web test prior to using it, by deleting the dependents and correlating hidden fields. 

Now let’s walk through the new method of saving the test.  Select all requests in the fiddler UI and then go to File - > Save -> Sessions -> as Visual Studio Web Test.  First you will be prompted for where you want to save the test.

 Next you will be prompted for which FiddlerWebTestPlugins you want to execute.  This dialog will look like it the screen shot below:

A FiddlerWebTestPlugin is a class that has access to the fiddler sessions and can modify how the web test is saved.  If you are familiar with VSTS web test plugins, these are implemented in a similar manner.  I will go into much more detail about the plugins in my next blog post.  For now accept all the available plugins and click OK.  When you do, the resulting web test will look like the following:

As you can see there are only 6 requests in my web test.  Now look at the viewstate parameters.  You can see from the screen shot below, that they are automatically correlated for you.

This web test is ready for use without any modifications.  Now it should be much easier to record and save a web test using fiddler. 

 

Published Tuesday, April 17, 2007 2:32 PM by slumley

Comments

# Recording Web Tests with Fiddler

The following article discusses enhancements made to fiddler which make it easier to use fiddler for

Tuesday, April 17, 2007 9:43 AM by Sean Lumley's Blog

# Fiddler updates help with VSTS Web Tests

I read with interest this morning, Sean Lumley's blog post entitled " Enhanced web test support in Fiddler

Tuesday, April 17, 2007 5:50 PM by My VSTS Blog

# VSTS Testing: Using Fiddler to record VSTS web tests

Sean Lumley , a developer on the VSTS web test team, has written a series of posts on using a new version

Wednesday, April 18, 2007 10:52 PM by Buck Hodges

# Tests Web, Ajax inclus, avec Team System : nouvelle version de Fiddler disponible

Je vous avais parlé de Fiddler et de l'article écrit par Florent Santin à ce sujet dans un post précédent

Thursday, April 19, 2007 4:14 AM by Visual Studio Team System en direct de Microsoft France

# Fiddler2 HTTP Debugger - 2.0 Release.

沒聽過 fiddler ? 你也應該試試下載 Fiddler2 HTTP Debugger - Fiddler2 Sean Lumley's Blog 整理了一份很詳細的文件, 你可以用 Fiddler

Friday, April 20, 2007 12:47 AM by Refines.Info["Polo Lee"]

# re: Enhanced web test support in Fiddler

Great one! Nice to see that Fiddler 2 solved those key probs during my usage of Fiddler 1.x for generating .webtest.

Friday, April 20, 2007 3:46 AM by crazychao

# Links of the Week - April 21 2007

The Blog entries are going to be few and far between for a few days as I am finishing content for my

Tuesday, April 24, 2007 7:36 AM by Chris Love's Official Blog - Professional ASP.NET

# Tests Web, Ajax inclus, avec Team System : nouvelle version de Fiddler disponible

Je vous avais parlé de Fiddler et de l'article écrit par Florent Santin à ce sujet dans un post précédent

Monday, July 09, 2007 3:23 AM by Visual Studio Team System

# Tests Web, Ajax inclus, avec Team System : nouvelle version de Fiddler disponible

Je vous avais parlé de Fiddler et de l'article écrit par Florent Santin à ce sujet dans un post précédent

Monday, July 09, 2007 3:31 AM by Noticias externas

# Creating Transactional Web Tests for Visual Studio with Fiddler / neXpert

One of the best features of Fiddler when performance testing is it’s ability to save a capture as a Visual

Monday, May 04, 2009 7:01 PM by neXpert Performance Tool
Anonymous comments are disabled
 
Page view tracker