One of the best features of Fiddler when performance testing is it’s ability to save a capture as a Visual Studio Web Test. You can then use this web test to functional test or stick it in a load test to stress test your site.
The latest version of Fiddler (126.96.36.199) has an updated “Save As Visual Studio Web Test” which will now use any steps you created with neXpert to automatically create transactions in the generated web test.
NOTE: You may experience a bug with the think time not correctly being set on the resulting web test. You can easily change the think time between requests through the Visual Studio GUI. This will be fixed in a future version of Fiddler. (This note will be updated with the version it is fixed in)
If you have never checked out the original feature, please see the following resources:
This post will first go over the value of transactions and then provide a walkthrough of creating transactional web tests with Fiddler/neXpert
“A transaction in a Web test is like a timer. You can encapsulate a set of actions in a transaction. You can think of a typical transaction as starting a timer, requesting a page, requesting another page, and then ending the timer. This series of actions, from start to end, constitutes a transaction.
When using Web tests in a load test, transaction response times are displayed in the transaction table of the Load Test Analyzer.” MSDN
So what does that mean exactly? Transactions let you:
All so you can get an accurate response time for each step of a common scenario.
Lets look at some quick examples. Say we want to script a web test of the neXpert blog. Lets do the classic scenario of:
Doing this using the VSTS recorder or Fiddler we get the following web test:
Running the test produces the following:
As you can see, each page is given it’s own timer. This is fine for a simple site like the blog, but what about a more involved site like Facebook?
Lets look at the following simple Facebook scenario:
Even though there are only 3 steps, there are 10 steps recorded by VSTS to complete the scenario
Running the web test also shows the time and statistics for all 10 (Not aggregates of the 3 steps we are interested in):
Here is where the power of transactions comes in. Wrapping the appropriate steps in transactions now produces the following web test:
And running the web test produces the following chart:
Not only does this help with a single web test, it also helps with load testing. Now you can view results by transaction after a load test is finished. Facebook was “load tested” with 1 user for 30 sec.
The following is a snippet from the Load Test Summary provided at the end of a load test run.
Now that I have convinced you to use transactions, lets walk through how to use Fiddler/neXpert to create transactional web tests.
Here is a screenshot of running through a typical scenario of someone visiting the neXpert blog. Notice the step names marked in the “Step" column.
Highlight all the session you wish to create a web test from, then select Save… Selected Sessions… as Visual Studio Web Test from the File menu.
In Visual Studio, create a new Test Project which will hold the web test.
Right click on the project name and choose Add … Existing Item.
Navigate to your saved web test. Be sure to change the filter to the right of the File name box to “Web Test Files”
You should now see your web test in the project in the Solution Explorer.
Double clicking on the web test in the Solution Explorer will allow you to configure the web test. As you can see, the step names in neXpert were used to create the name of each transaction.
PingBack from http://microsoft-sharepoint.simplynetdev.com/creating-transactional-web-tests-for-visual-studio-with-fiddler-nexpert/
Check out this blog post from Eric Mattingly about extenstions he added to fiddler for creating VSTS
Thank you for submitting this cool story - Trackback from DotNetShoutout
Does anyone know if there is a way to copy the step marker from the old session entry, to the new session entry during a Fiddler replay?