Freigeben über


Vsts 2008 WebTest Asp.Net UnitTest Profiling

How to Enable Code Coverage for a machine hosting the WebSite 

 

1. The  webapp's bin folder should have all files readonly false.

2. The second thing to do is switch off signature verification for all dlls in bin folder., using the below command

<x:\webApppath>Sn – Vr *

3.   on the code coverage setup, only check the Checkbox for WebApp not for Dependent dlls. It automatically adds all dependencies.

To grant access to shared project files

  1. In Windows Explorer, locate the root of the folder tree for project files used by this user aspnet or w3wp and shared by the project team.

    The path of this folder might resemble the following:

    D:\ourProject

  2. Right-click the folder and then click Properties.

    The <folder name> Properties dialog box appears.

  3. Click the Security tab.

  4. Click the name of the user's account in the Group or user names box.

  5. In the Permissions for <user name> box, select the check box for Full Control.

  6. Click OK.

    This grants permissions to the user for the shared folder tree that begins with the folder selected in step 5.

    To grant access to the profiling driver

    1. Open a command prompt as an administrator.

    2. Change the directory to:

      <drive>:\Program Files\Microsoft Visual Studio 9\Team Tools\Performance Tools

    3. Run the following command:

      vsperfcmd /admin:driver,start /admin:service,start
      This command installs and starts the driver for the Visual Studio Team Edition for Developers Profiling tools.

      This command starts the profiling driver and service so that non-admin users may use profiling features that are available in their User process space. Only an Administrator may run the command; and it will fail for non-administrative Users.

      Notice that the effects of this step are undone after the computer restarts, unless you also perform the final step in this procedure.

    4. Run the command to allow access to profiling driver functionality by a user or group that does not have administrator access to the computer:

      vsperfcmd /admin:security,allow,<right[,right],<user name|group name>

    5. This command grants the <user name> or <group name> account access to the Profiling tools. The <right> option determines the profiling functionality the user can access. The <right> option can be one or more of the following values:

      • FullAccess - allows access to all profiling methods including collecting performance data from services, sampling, and cross session profiling.

      • SampleProfiling - allows access to sample profiling methods

      • CrossSession - allows access to cross session profiling which is required for profiling services.

    6. (Optional) To preserve the results of any of the previous steps after computer restarts, run the following command:

    7. vsperfcmd /admin:driver,autostart,on

    The specified users, after logging on, will now be able to use the Team System profiling tools without Administrator permissions

I got these similar issues when running codecoverage , and I used the above steps for resolution.

Comments