Monday, 16 March 2009

VSTS Load/Web Testing and Browser Definitions

When you add a VSTS load test or when you configure a web test you can specify the browser(s) to use for the test. The data for each type of browser is held in files with a .browser extension in the C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Templates\LoadTest\Browsers directory.

You can add your own browsers to this list by copying and renaming one of these files and changing the details within the file. The files are XML so this is easy to do, they look something like this

<Browser Name="Netscape 6.0">
  <Headers>
    <Header Name="User-Agent" Value="Mozilla/5.0 (Windows; U; Windows NT 5.0; en; rv:1.0) Netscape/6.0" />
    <Header Name="Accept" Value="image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*" />
    <Header Name="Accept-Language" Value="{{$IEAcceptLanguage}}" />
    <Header Name="Accept-Encoding" Value="GZIP" />
  </Headers>
</Browser>

Remember to change the Name attribute on the Browser element otherwise you'll see the same browser listed twice inside visual studio.

After making the changes you will need to re-start Visual Studio to see your new browser listed.

Posted by kevin at 7:08 AM in Net

 

[Trackback URL for this entry]

Your comment:

SCode: (*) Generate another code
SCode

Please enter the code as seen in the image above to post your comment.

(not displayed)
 
 
 

Live Comment Preview:

 
« March »
SunMonTueWedThuFriSat
1234567
891011121314
15161718192021
22232425262728
293031