使用Visual Studio Profiler测试host在本地IIS上的WCF服务性能
http://www.cnblogs.com/telnet_mike/archive/2011/11/07/2240351.html
读过上篇bolg的现在应该知道怎么样来Profile一个WCF项目了,今天我们来看一下怎样Profile一个host到本地IIS上的WCF服务,我们还是使用Visual Studio 2010还有上篇blog中的测试项目。
使用Administrator账户启动Visual Studio 2010!
How to: Host a WCF Service in IIS
Deploying an Internet Information Services-Hosted WCF Service
Using Visual Studio 2010 to Host a WCF Service on the Local IIS Instance
Open or create a WCF Service Application project. Right click the project in the solution explorer and select Properties. In the project properties window select the Web tab on the left hand side of the window. On the right hand side of the window, under Servers, select the Use Local IIS Web Server and type in a URL. Next, click the Create Virtual Directory button and build the solution. This will create the virtual directory in IIS and map it to your project directory. The service will then be hosted on the local IIS server for building and debugging purposes. To verify the service has been hosted, open Internet Explorer and type the service’s URL in the address box. You must type in the complete URL path to the .svc file. For example, with a default WCF Service Application project hosted under http://localhost/MyFirstService the complete URL would be http://localhost/MyFirstService/Service1.svc. This will display the default WCF Service page.

使用同样的步骤将我们的WebApplication1 asp.net应用程序项目也host到本地IIS上。
WcfService1地址: http://localhost/WcfService1/Service1.svc
WebApplication1地址: http://localhost/WebApplication1




IE会直接打开WCF服务的页面:

现在我们可以用WebApplication1地址来替换WcfService1地址,并让IE浏览它,这样我们可以使用我们的asp.net应用来调用WcfService1中的函数,从而达到测试性能的目标。

报表会在你关闭IE的时候,Visual Studio Profiler工具停止后,自动打开。

你可以看到所有的函数调用,但你点击WcfService1.Service1.Abc(int32)函数后,它会为你打开一个详细页面和你的函数源代码。

My English Blog: http://mikedoszhang.blogspot.com/2011/11/profile-wcf-which-hosted-in-local-iis.html
您可能感兴趣的文章 (亲!如果本文有错误,请来挑错)
本文标题:使用Visual Studio Profiler测试host在本地IIS上的WCF服务性能
http://www.ltesting.net/ceshi/ceshijishu/rjcsgj/qita/vsts/2012/0109/203882.html
今日推荐
关注排行榜
软件测试专题
软件测试资源下载
- Windows Server 2008 R2 SP1 简体中文版下载
- Windows Server 2008 with Service Pack2(X64)官方简体中文版
- Windows Server 2008 with Service Pack2(X86)官方简体中文版
- Jmeter 2.6 下载
- QTP 10 中文版官方中文补丁 下载
- Quicktest Professional 10 (QTP 10) 下载地址
- Application Lifecycle Management(ALM 11) 官方中文版下载
- ALM11 中文资料 下载
- Quality Center 9.0中文版 下载
- HttpWatch Basic Edition Version 7.2.20 下载
软件测试视频
什么是黑盒测试? 黑盒测试一般方法? 什么是白盒测试? 什么是灰盒测试?[详细]













