dotCover 2021.2 Help

Web Applications Using IIS

Control+Alt+K K

In Visual Studio:
ReSharper | Cover | Cover Application...
ReSharper_CoverApplication

In dotCover standalone application:
File | Cover Application...

With dotCover, you can run coverage analysis for web applications on IIS servers.

Before you start profiling a web application make sure that:

  • IIS is installed on your computer.

  • Your web application is deployed to IIS.

  • Caching in your web browser is disabled. Alternatively, use Ctrl+F5 to manually refresh the page that is running the profiled application.

  • dotCover is run on behalf of Administrator.

To start a coverage run on IIS server

  1. Do one of the following:

    • In Visual Studio, press Control+Alt+K K or choose ReSharper | Cover | Cover Application... from the main menu

    • In dotCover standalone application, press Control+Alt+K K or choose File | Cover Application... in the menu.

  2. Add a run configuration - the configuration that tells dotCover how to run the analyzed application:

    • Under Cover application, click Add run configuration Add run configuration.

    • In the New Run Configuration wizard, choose IIS and click Next.

    • In Open URL, specify the URL of the profiled application. If you do not do this, dotCover will start profiling of the first running application pool it'll be able to find.

    • Optionally, in in browser, specify the browser that dotCover should use to open the URL.

    • Optionally, in Set environment variables, specify required environment variables. Each variable must be specified on a new line.

    • Click Save.

  3. Make sure the created run configuration is selected in the New Process Run list.

  4. Optionally, click Edit Symbol Search Policy to specify where to search for PDB information.

  5. Under Run analysis, click Start. dotCover will open the Coverage Controller dialog and then run the selected application.

  6. If the Collect coverage data from start checkbox was selected, the coverage run starts immediately. Otherwise, dotCover waits until you click Start in the Coverage Controller dialog. When the coverage run is started, you can record code coverage.

Last modified: 05 April 2021