dotCover 2024.1 Help

Web Applications Using IIS

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... from the menu.

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

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

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

    3. 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.

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

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

    6. 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: 09 April 2024