[VSTT] 如何將 IE7 加入瀏覽器類型中?

筆者的環境為 Vista + Visual Studio 2005 Team Suit SP1 + Database Professional with SR1&Power Tool。

上回建立負載測試中,提及 VS 2005 預設並沒有 IE7 的瀏覽器類型可以使用,要如何增加呢?

步驟如下:

1) 移至 C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\Templates\LoadTest\Browsers

2) 複製並貼上 IE6.browser 檔案,將之改名為 IE7.browser

3) 使用 Notepad 開啟 IE7.browser 檔案

4) 把 "<Browser Name="Internet Explorer 6.0">" 改為 "<Browser Name="Internet Explorer 7.0">".

5) 把"<Header Name="User-Agent" Value="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" />" 改"<Header Name="User-Agent" Value="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)" />"

6) 存檔

 

重新開啟 VS 2005 後,即可以看到剛才所加入的 IE7 的選項,如下圖:

image

當然您也可以加入其它的瀏覽器