Welcome to MSDN Blogs Sign in | Join | Help

Adding an IE7 Browser Template for use by Web Tests

This post walks you through the process of adding a new IE7 browser template that can be used by your web tests when running them stand alone or inside of a load test.  When you run a web test, the test will appear as if it is coming from one of the predefined browsers.  By default, they will simulate IE6.  But this can be changed by opening the run configuration file, clicking on the web test tab and selecting a new browser type.  When running a web test inside of a load test, you can add a mix of browser types that the web test will simulate.  The way a web test simulates different browsers is by adding a set of headers to the request.  The main header is the user-agent header which indicates the browser.

 

Here are the steps for creating a new template:

1)      Go to the location the templates are stored in: Program Files\Microsoft Visual Studio 8\Common7\IDE\Templates\LoadTest\Browsers

2)      Copy the IE6.browser file and rename it IE7.browser

3)      Open the IE7.browser file.

4)      Change the name attribute on the Browser element to Internet Explorer 7.0

5)      Change the value attribute for the User-Agent header to:  Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)

6)      Save file

 

Let’s verify the new template can be read in.

1)      Close and re-open Visual Studio

2)      Open a test project or create a new one

3)      Add a web test to the test project

4)      Open the LocalTestRun.testrunconfig file under the Solution Items folder

5)      Click the web test tab

6)      Click the drop down for Browser Type and select Internet Explorer 7.0

7)      Save the test run configuration file

8)      Run the web test

9)      Click on any request once the test is complete

10)  Click on the request tab in the web test playback UI

11)  You should see the user agent header set to the value above.

 

You can also add this new template to a load test.  When you are on the browser tab of the load test wizard, this new template will be one of the available browsers available.  This same process can be used to add additional browser types that you want to simulate.

Published Friday, December 15, 2006 4:43 PM by slumley

Comments

# Adding an IE7 Browser Template for use by Web Tests

Here is an article for adding an IE7 Brwoser template: Template Article

Friday, December 15, 2006 11:47 AM by Sean Lumley's Blog

# re: Adding an IE7 Browser Template for use by Web Tests

Excellent it was really helpful

Thanks Sean

Thursday, January 18, 2007 5:21 AM by MadhuGuptha

# re: Adding an IE7 Browser Template for use by Web Tests

Hi,

We are creating a web test with IE 7.0 which records a report viewer page (GET /KIAS_MIGVER_QA/Reports/Miscellaneous/rptEligiblePromotion.aspx)

We get the following error once we execute above web test:

Your browser does not support scripts or does not configured to allow scripts

Thanks,

Sneh

Thursday, March 29, 2007 9:16 AM by smtripathi99

# Web Test Browser Types

At Geeks I showed the Load Test using IE6 as a client and mentioned that you can add your own entries

Wednesday, April 04, 2007 1:25 AM by Knowledge, Insight, Action; In that order!

# Creating custom counter sets

This blog post will describe how to create custom counter sets. First let me start with what a counter

Sunday, May 04, 2008 9:24 PM by Sean Lumley's Blog

# How To Add New Browser To The Browser Mix in VSTS 2008

In Sean Lumley's Blog , it walks you through how to add a new browser to the Browser Mix in a Load Test

Monday, August 04, 2008 3:40 AM by Developers, Developers, Developers!
Anonymous comments are disabled
 
Page view tracker