Script recording

Visual Studio recording engine seems to not record some parts of the HTTP requests - notably request headers. Although in most of the cases this will not be much of a problem it can sometimes cause lots of headache and slow down script preparation.

As the alternative to using native VSTS recording capabilities one can use very common Web debugger called Fiddler. This tool can intercept web traffic in the similar way to VSTS and then export the session as VSTS Web Test. Since Visual Studio Web Test has not been design to store HTTP responses it is recommended to save the captured session in the fiddler data file *.saz

Fiddler is very flexible and portable tool which can be set up in much shorter time then Visual Studio. This utility is capable not only of recording and playing back the captured sessions but also via its build-in traffic inspector module it allows to view the raw data which has been passed between the web browser and the web server. This feature might prove to be very important while trying to make the Web Tests work.

Although Fiddler is very capable tool it might fail to work with some types of the HTTP requests. If that happens another tool called Wireshark could be used.

This tool lacks support for Visual Studio and thus it is a bit more awkward to use. It works on the lower level protocols (i.e. Ethernet, TCP/IP) and records a lot of data which does not necessarily should be included in the Web Test .

One of the powerful features of Wireshark is to track different kinds of sessions. Using that ability it is quite simple to make Wireshark to display subsequent requests/responses in its raw format.

As it would be a difficult task to create the whole Web Test from that raw view I usually record as much as possible using either VSTS or Fiddler and then use Wireshark to find out what my scripts are missing. The missing requests have to be manually added to script.

For a full guide on how to record VSTS WebTests using Fiddler please visit my blog.