How to: Visual Studio web performance tests – not using Internet Explorer

A client asked me how to create and run Visual Studio web performance tests using something other than Internet Explorer. (His web app only runs in a particular browser, and it’s not IE.) Here’s my answer.


Recording a web performance test using a browser other than Internet Explorer

The Web Test recorder in Visual Studio is going to open up Internet Explorer for recording. Period.

If you want to use some other browser (I used Firefox in my example) as the recording environment instead of Internet Explorer, you can use Fiddler 2.0 ( to capture the HTTP traffic. Once you’ve gone through the web user scenario in the browser of your choice, in Fiddler go to File > Export Sessions > All Sessions . . . > Select Export Format > Visual Studio Web Test

Fiddler 2.0 captured the HTTP traffic generated from Firefox browser. I’m about to export it.

Then in Visual Studio, open the webtest file you exported from Fiddler.

  1. In VS, create a test project
  2. Right click on the test project > Add > Existing item . . .
  3. Browse to the webtest file you exported from Fiddler (make sure your filter is set to “(*.webtest)” as shown below)
  4. Select your webtest file and open it.

Here’s the webtest file I created using Fiddler and Firefox, opened in Visual Studio. Looks kind of normal, doesn’t it?



Running a webtest using a browser other than Internet Explorer

In a web performance test, you can change the Browser type for an individual run, but that setting is not permanent. It resets to the default after the test completes.

Changing the browser type for an individual web test run

If you want to make the change effective across multiple runs, you need to change the test settings via Test > Edit Test Settings. See images below. These changes will be saved until you change them again. Note: you can have multiple testsettings definitions. For more info about testsettings, see: You need to be sure which testsettings file you’ve set to active. That’s managed from Test > Select Active Test Settings.


Changing the browser type “permanently”

Here’s the web test, paused just before running, showing Firefox 2.0 is the browser type:


And here’s the test run after completion. (Notice that I ran my test against my local TFS instance?)  🙂  


It’s as easy as that.

Additional background information regarding the Web Performance Test Engine:

Hope this helps!


Fabulous reference for performance testing

If you’re into performance testing – and who isn’t these days? – and you haven’t downloaded the Visual Studio Performance Testing Quick Reference Guide, then you’re really missing out. Stop reading this blog post and go download it now. I’ll be here when you get back.

Why is this required reading for performance testers? Just take a look at the summary:

This document is a collection of items from public blog sites, Microsoft® internal discussion aliases (sanitized) and experiences from various Test Consultants in the Microsoft Services Labs. The idea is to provide quick reference points around various aspects of Microsoft Visual Studio® performance testing features that may not be covered in core documentation, or may not be easily understood. The different types of information cover:

  • How does this feature work under the covers?
  • How can I implement a workaround for this missing feature?
  • This is a known bug and here is a fix or workaround.
  • How do I troubleshoot issues I am having?

The document contains two Tables of Contents (high level overview, and list of every topic covered) as well as an index. The current plan is to update the document on a regular basis as new information is found.

Who can resist that?

Go. Now. Download and enjoy.

— bliz

Hyper-V settings for a rocking fast VM

The other day I was doing a presentation in the Microsoft Tampa office. Unfortunately my display driver acted up when I connected my laptop to the projector cable, and my VM ran as slow as molasses as I was presenting a hands-on workshop for 5 customers. The next day I went back to the office. My goal was to see if the new video driver I had installed would help resolve 1) the issues I was having with the projector, and 2) perhaps some of the VM performance issues. (#2 was a stretch, but I’ve heard rumors of video drivers that cause machine performance issues.)

The new driver did fix the problems with the projector, but didn’t seem to do anything to improve the VM performance.

After I got back home, I took a look at the processor settings for my VM, a highly customized version of Brian Keller’s public VS 2010 RTM hyper-V image.

I shut down the VM (it has to be off to do this) and bumped the Number of logical processors from 1 to 4, the Virtual machine reserve (percentage) from 0% to 50%, and also changed the RAM from 3000 MB to 4096 MB.

image   image

When I booted the VM, the difference was amazing. It is now rocking fast. I haven’t been able to get back to the MPR to see if it’s just a place with bad demo karma, but my bet is on the new settings.

There are other things that you can do to make your Hyper-V images fast, such as using a fixed disk, etc., and that VM in particular, such as turning off the data warehouse sync service, and the SharePoint timer service. . . which were already done on this image.

The most significant change? I improved the performance in a huge way by going into the VM and disabling the network adapter that I had set up to connect to wireless networks. Turns out that when the VM’s network adapter was trying to connect to a network for which it didn’t have a WEP key, it took up a lot of resources under the cover, slowing down the VM dramatically. Simple change. Amazing performance improvement.

— bliz