Extending Load Testing Browser Support

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.

Pin It

Comments are closed.