While finishing the revisited and new “Web Performance Testing with Microsoft Visual Studio 2013” training, I found a very interesting topic to cover, idea of my colleague Carl Bricknell, that is to migrate Fiddler2 sessions to Visual Studio generating new Web Tests.
As you know Visual Studio 2013 Ultimate and Visual Studio 2015 Enterprise have included the templates for Load and Performance Tests.
It’s as easy as go into VS and create a new “Web Performance and Load Test project”.
Usually, once the project is done, we have to record our session with the Web Test Recorder as follows:
And right after our session, we will be able to edit the recorded test steps on the WebTest view. This will allow us to create our validation rules that would be used to let the test pass or fail; also create, modify and delete web requests, their headers, parameters (dynamic and statics) and, the most fancy feature, to add data parameters in order to replay the tests several times with different data straight from an Excel Sheet, CSV file or SQL Database.
Many testers and developers use Fiddler2 in a daily basis, and this is because is one of the most powerful web traffic capture tools.
Fiddler2 includes the ability to capture web traffic (including AJAX requests) for later playback with the Visual Studio Web Performance Test feature. It can also be used to help debug your Web performance tests. Comparing your Fiddler2 recording and your Web performance test recording can help identify key missing headers that your Web performance test may not record, amongst other things.
We can summarize as:
Fiddler is at HTTP debugging proxy server application that captures HTTP and HTTPS traffic and logs it for the user to review.
Fiddler can also be used to modify HTTP traffic for troubleshooting purposes.
In order to export Fiddler2 recording sessions to Visual Studio Web Test Project we need to follow the next steps:
- Create a Visual Studio empty Web Test Project
- Record your session using Fiddler2
- Export the Fiddler 2 session to the Visual Studio Web Test Project
The exporting is very straight forward:
- Go to File à Export Sessions à All sessions
- Select Visual Studio Web Test as Export Format
Select all the plugins installed by default:
- Find the generated web test in your hard drive and attach it to your Visual Studio Web Test Project:
From here, everything that happens is result of your creativity, it’s ready for testing!
- Happy testing! –
Eduardo Ortega Bermejo
If I open up the webtest file that is created, it doesn’t contain any of the sessions that I recorded. i.e. its an empty test. Any idea what could be going on?