- Disable Capturing mode from the bottom left corner
- Remove all requests from Fiddler; this step is optional and if it ware skipped fiddler will append requests from loaded archive to the current list of requests
- Chose File > Load Archive from the main menu
- Open Fiddler archive file (.*saz)
Wednesday, 30 June 2010
Opening Fiddler archive using Fiddler
Tuesday, 29 June 2010
Saving fiddler session and exporting WebTest
- Select all requests to be exported from Fiddler. This can be done by selecting Edit > Select All from the main menu
- Chose “Visual Studio WebTest” from the drop-down and click next button
- Select the location where to save the file
It is a good practice to give the same filename to both files since it will make it easier later on to match WebTest to original Fiddler archive file.
- BusinessProcess1-Rec1.saz
- BusinessProcess1-Rec1.webtest
Recording VSTS WebTests with Fiddler
- Start fiddler
- Make sure that fiddler is in “Capturing” mode (bottom left corner)
- Lunch web browser and navigate to any page
- Check Fiddler window; if no request is recorded make sure fiddler plug-in is turned on in the browser. Alternatively web browser proxy settings can be configured manually to 127.0.0.1 and port 8888
- Delete all requests from the Fiddler using Remove->All menu option
- Switch to the “Request Builder” tab on the right side, type in comment for the next step in the business process (e.g. navigate to application homepage) and click execute button.
This will result in an incorrect (red) http request recorded by Fiddler which is expected.
The purpose of this procedure is to add a comment to the recorded script. Once the script is exported into VSTS those invalid requests will be replaced with comments.
Although there is comment functionality already build-in Fiddler it is awkward to use. Fiddler comments will not be visible in Fiddler and they will only appear when the webtest is opened in VSTS
- Refer to the business process script and perform action in the web browser (e.g. navigate to the login page, login, logout, etc.)
Add a new comment each time a new request(s) is recorded. It is common for a single button click to generate many requests.
- Repeat steps 6-8 to complete business process
- Switch to Fiddler and click “Capturing” icon in the left bottom corner to stop recording
Using Fiddler with Visual Studio Team System (VSTS) 2010
![]() |
Fiddler |
- Recording the script
- Saving the script
- Opening recording session in Fiddler and VSTS
- Adding comments and transactions to the WebTest
- Correlating the script
- Script data parametrisation
- Parametrising environment URL
- Developing custom extraction rules
Introduction to the Visual Studio Team System 2010 WebTest

- Headers
- Dependant requests
- QueryString Parameters
- Form Post Parameters








Visual Studio Web Test Viewer
As the name states this tool is just a viewer. It could be used to open WebTests exported from Fiddler without the need of having Visual Studio installed.

This tool can be downloaded from its CodePlex project page: http://webtestviewer.codeplex.com/
Cleaning VSTS test results database
Cleaning test results database
Default installation of Visual Studio comes with SQL Server Express database which is used for storing load test data.
With every new test run the Visual Studio results database gets bigger and bigger and might eventually reach a 4BG which is the maximum database size in the SQL Server Express edition. When that happens no more tests can be run.
This problem can be overcame by either removing some of the historical results or renaming LoadTest database to something else and recreating the schema.
Removing test results
Removing no longer needed results will usually take longer as the SQL stored procedure needs to remove records from many related tables. The advantage of using this method is that there will only be one database containing only the important test results.
All operations described on that page require SQL execution engine such as Microsoft Management Studio.
Removing individual results
Test runs could be deleted from within Visual Studio by opening "Manage Test Results", connecting to a controller (or local instance of Visual Studio), selecting the result and clicking Remove button.
Test results could also be deleted directly from a database by executing Prc_DelereLoadTestRun stored procedure on the LoadTest database.
Exec Prc_DeleteLoadTestRun 1
In order to find more information about runs execute this SQL statement:
Select * from LoadTestRun
Removing old results based on date
Following code (which comes from Bill Barnett blog at http://blogs.msdn.com/billbar/archive/2006/02/09/528900.aspx) is a more robust SQL script which remove all test run results which are older then 14 days. This number could be changed depending on how many results needs to be deleted.
USE LoadTest
DECLARE @LoadTestRunId int
DECLARE OldLoadTestsCursor CURSOR FOR
SELECT LoadTestRunId FROM LoadTestRun
WHERE datediff(dd, StartTime, getdate()) > 14
OPEN OldLoadTestsCursor
FETCH NEXT FROM OldLoadTestsCursor INTO @LoadTestRunId
WHILE @@FETCH_STATUS = 0
BEGIN
EXEC Prc_DeleteLoadTestRun @LoadTestRunId
FETCH NEXT FROM OldLoadTestsCursor INTO @LoadTestRunId
END
CLOSE OldLoadTestsCursor
DEALLOCATE OldLoadTestsCursor
Recreating results database
This approach is faster to use since the database data remains the same and only the database name gets changed.
Ones connected to a database rename the LoadTest database to something else and:
- Open Visual Studio command prompt
- For Visual Studio 2008 type: cd "C:\Program Files\Microsoft Visual Studio 9\Common7\IDE"
- Type: SQLCMD /S localhost\sqlexpress /i loadtestresultsrepository.sql
For more complete guide to setting up LoadTest database please refere to this MSDN article: http://msdn.microsoft.com/en-us/library/ms182600.aspx
Default installation of Visual Studio comes with SQL Server Express database which is used for storing load test data.
With every new test run the Visual Studio results database gets bigger and bigger and might eventually reach a 4BG which is the maximum database size in the SQL Server Express edition. When that happens no more tests can be run.
This problem can be overcame by either removing some of the historical results or renaming LoadTest database to something else and recreating the schema.
Removing test results
Removing no longer needed results will usually take longer as the SQL stored procedure needs to remove records from many related tables. The advantage of using this method is that there will only be one database containing only the important test results.All operations described on that page require SQL execution engine such as Microsoft Management Studio.
Removing individual results
Test runs could be deleted from within Visual Studio by opening "Manage Test Results", connecting to a controller (or local instance of Visual Studio), selecting the result and clicking Remove button.Test results could also be deleted directly from a database by executing Prc_DelereLoadTestRun stored procedure on the LoadTest database.
Exec Prc_DeleteLoadTestRun 1 |
In order to find more information about runs execute this SQL statement:
Select * from LoadTestRun |
Removing old results based on date
Following code (which comes from Bill Barnett blog at http://blogs.msdn.com/billbar/archive/2006/02/09/528900.aspx) is a more robust SQL script which remove all test run results which are older then 14 days. This number could be changed depending on how many results needs to be deleted.USE LoadTest
OPEN OldLoadTestsCursor |
Recreating results database
This approach is faster to use since the database data remains the same and only the database name gets changed.
Ones connected to a database rename the LoadTest database to something else and:
- Open Visual Studio command prompt
- For Visual Studio 2008 type: cd "C:\Program Files\Microsoft Visual Studio 9\Common7\IDE"
- Type: SQLCMD /S localhost\sqlexpress /i loadtestresultsrepository.sql
For more complete guide to setting up LoadTest database please refere to this MSDN article: http://msdn.microsoft.com/en-us/library/ms182600.aspx