Extending Load Testing Browser Support

Extending Load Testing Browser Support

Posted by richard | May 24, 2007 | Development, Visual Studio 2005, Visual Studio ALM

The browser support out-of-the-box for Team Edition for Testers is pretty minimal. But, you can extend this support by adding your own browsers (common ones you’ll probably want to add are IE7, Firefox and Opera and there are others you can probably think of). The files which provide the configuration for the browser types are stored in the C:Program FilesMicrosoft Visual Studio 8Common7IDETemplatesLoadTestBrowsers. You will several files which end in the extension “.browser”. These files simply contain the header information a browser sends with a request. The IE6.browser file looks like the following:

<Browser Name=”Internet Explorer 6.0″>
  <Headers>
    <Header Name=”User-Agent” Value=”Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)” />
    <Header Name=”Accept” Value=”*/*” />
    <Header Name=”Accept-Language” Value=”{{$IEAcceptLanguage}}” />
    <Header Name=”Accept-Encoding” Value=”GZIP” />
  </Headers>
</Browser>

If you aren’t sure of what information to enter in this file, simply open up your favorite browser that isn’t in the list and go to http://www.ranks.nl/tools/envtest.html and grab the appropriate values! Use the IE6.browser file as a template. For example, if you wanted to add support to test Opera you might add the following and save it as Opera.browser:

<Browser Name=”Opera 8.0″>
  <Headers>
    <Header Name=”User-Agent” Value=”Opera/8.00+(Windows+NT+5.1;+U;+en)” />
    <Header Name=”Accept” Value=”text/html, image/jpeg, image/gif, image/x-bitmap, */*” />
    <Header Name=”Accept-Language” Value=”en” />
    <Header Name=”Accept-Encoding” Value=”GZIP” />
  </Headers>
</Browser>

There are obviously other values you can place here and some of this will be dependent on your locale, plug-ins you have loaded and other environmental factors. Once you save this file, you should be able to go in and create a new load test and Opera 8.0 will now show up as an option in your browser mix list.

Related Blogs

Posted by richard | September 30, 2016
Wassup Team Room?
According to Microsoft's official definition, Team Rooms, like chat rooms, "provide teams with a space to discuss work in progress, ask questions, share status, and clarify issues that arise." Sounds...
Posted by richard | February 24, 2015
Use Excel to Create Repetitive Work Items
Teams often ask me for any shortcuts to periodically creating the same work items, such as for each sprint or release. In other words, they want to create the same...
Posted by richard | October 21, 2014
A unique load testing experiment
Most of the guidance you'll find about Visual Studio Ultimate Load Tests suggests that they are only for load testing Web Performance tests. Actually, they can be used to load...