dotCover Web Help

In Visual Studio:
dotCover | Cover Application
Ctrl+Alt+K,K

In dotCover standalone application:
File | Cover Application
Ctrl+C

With dotCover, you can run manual test sessions for Web applications on IIS and IIS Express servers. dotCover will start the specified server for you and optionally a Web browser with the page of the target application.

Note

The application or process you choose must have PDB information. Otherwise, dotCover will not be able to record the coverage information. For more information, see where to search for PDB information

Before you run coverage analysis for a Web application on IIS or IIS Express server, make sure that:

  1. IIS or IIS Express is installed on your computer. Otherwise you should install it:
    • To enable IIS on Windows XP:
      Select the check box next to Internet Information Services (IIS) in Windows Components Wizard. To open the wizard, click Start and choose Control Panel | Add or Remove Programs | Add/Remove Windows Components.
    • To enable IIS on Windows Vista and Windows 7:
      Select the check box next to Internet Information Services in the Windows Features dialog. To open the dialog, click Start and choose Control Panel | Programs and Features | Turn Windows features on or off.
  2. Your Web application is deployed to IIS. For more information, see Deploying Web Sites on IIS.
    If you use IIS express, dotCover can deploy your application automatically before the test run.
  3. Caching in your Web browser is disabled. Alternatively, use Ctrl+F5 to manually refresh the page that is running the target application.

To start a manual test session on IIS server
  1. Do one of the following:
    • On the Visual Studio main menu, choose dotCover | Cover Application or press Ctrl+Alt+K,K.
    • On the main menu of dotCover standalone application, choose File | Cover Application or press Ctrl+C
  2. In the Cover Application dialog box that appears, choose IIS Application and click OK.

    Note

    You must have Administrator permissions to start a manual test session on IIS server.

  3. The Coverage Configuration dialog box opens.
  4. If you want to start a Web browser with your application, tick the Run browser check box and type the URL of your Web application.
    If necessary, in the Browser drop-down list, change the browser that should be used.
  5. To configure additional coverage options, click the arrow in the bottom of the Coverage options section.
    The Edit Symbol Search Policy button that appears, allows specifying where to search for PDB information.
  6. Click Run. dotCover will open the dotCover Controller dialog box and then start the IIS server. You need then navigate to your application Web page in a browser or press Ctrl+F5 to refresh the page.
    If the Run Browser check box is selected, dotCover will start the selected Web browser or open a new Web page tab at the specified URL.
  7. If the Start profiling immediately check box was selected, the test session is started immediately. Otherwise, dotCover waits until you click Start Profiling in the dotCover Controller dialog box. When the test session is started, you can record code coverage in the test session.

Warning

If you start coverage test run for another web application while IIS runs, your previous session is interrupted and a new one begins.

To start a manual test session on IIS Express server
  1. Do one of the following:
    • On the Visual Studio main menu, choose dotCover | Cover Application or press Ctrl+Alt+K,K.
    • On the main menu of dotCover standalone application, choose File | Cover Application or press Ctrl+C
  2. In the Cover Application dialog box that appears, choose IIS Application and click OK.
  3. The Coverage Configuration dialog box opens.
  4. In the Server drop-down list, choose one of the IIS Express servers installed on your computer.
  5. To specify the target Web application, do one of the following:
    • If your Web application is deployed on the IIS Express server, select Configuration file, and then choose a site name in the Site drop-down list.
    • If your Web application is not deployed on the IIS Express server, select Application path, and then in the Application path field, specify the physical path of your Web application. dotCover will deploy your application before starting the test run.
  6. If you want to start a Web browser with your application, tick the Run browser check box and type the URL of your Web application.
    If necessary, in the Browser drop-down list, change the browser that should be used.
  7. Optionally, click the arrow in the bottom of the Application options area to configure additional application settings:
    • The Configuration file field allows you to explicitly specify the IIS Express configuration file.
      As soon as you specify a valid configuration file, the list of available Web sites is updated accordingly.
    • The Runtime version field allows you to choose the .NET runtime version that will be used when deploying the application.
    • The Port field allows you to specify the Web server port that will be used when deploying the application. By default, the Web server port is detected automatically. To specify it explicitly, clear the Auto detect port check box and type a new port number in the Port field.
  8. To configure additional coverage options, click the arrow in the bottom of the Coverage options section.
    The Edit Symbol Search Policy button that appears, allows specifying where to search for PDB information.
  9. Click Run. dotCover will open the dotCover Controller dialog box and then start the specified web application on IIS Express server. You need then navigate to your application Web page in a browser or press Ctrl+F5 to refresh the page.
    If the Run Browser check box is selected, dotCover will start the selected Web browser or open a new Web page tab at the specified URL.
  10. If the Start profiling immediately check box was selected, the test session is started immediately. Otherwise, dotCover waits until you click Start Profiling in the dotCover Controller dialog box. When the test session is started, you can record code coverage in the test session.