Performance testing WCF web services using VSTS unit Tests

1. Create a Performance session using the performance wizard
2. Add the website hosting the WCF service to be profiled
3.Choose instrumentation rather than sampling , since it would give you the time spent in individual functions etc.
4.For some reason, the IDE doesnt give us an option to choose the unit test project as one of the target projects.
5. Do not choose any of them as the “set as launch” project. on Attach to process in the Performance Explorer window

somtimes we get the error message below, when we tried to attach to the aspnet_wp from Performance explorer using VSTS 2008 .

Wrong setting of COR_PROFILER environment variable in target process. Please use VSPerfClrEnv.cmd to set environment variables correctly.
a. Open vs 2008 command prompt
b. go to C:\Program Files\Microsoft Visual Studio 9.0\Team Tools\Performance Tools
c.Run the below command
> VSPerfClrEnv /globalsampleon
d. Restart the machine

7. Repeat 6
8.Run the Tests from the Test View window
9.Stop the Performance explorer
10.Thats it you get the performance report generated

Comments (0)