Web Applications Using IIS Express
In Visual Studio:
In dotCover standalone application:
With dotCover, you can run coverage analysis for web applications on IIS Express servers. dotCover will start the specified server for you and optionally a web browser with the page of the target application.
To start a coverage run on IIS Express server
- Do one of the following:
In Visual Studio, press Ctrl+Alt+K K or choosefrom the main menu
In dotCover standalone application, press Ctrl+Alt+K K or choosein the menu.
In the Coverage Configuration dialog that appears, choose IIS Express.
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 coverage run.
If you want to start a web browser with your application, select the Open URL check box and type the URL of your web application. If necessary, change the browser that should be used.
In the right panel, in IIS Express Application:
If the web app you want to profile is described in the default IIS Express configuration file (
applicationhost.config), select Configuration file and then, in Site, select a web site you want to profile.
Note that a config file location depends on a IDE you use:
Microsoft Visual Studio 2015 and later:
Microsoft Visual Studio 2013 and earlier:
If you do not want to use a configuration file, you can select Application path and specify a full path to the directory that contains the profiled application.
If you want the application URL to be opened automatically, once the profiling starts, select Open URL and specify the application URL. The in browser parameter allows you to select a browser in which the URL must be opened.
Optionally, if you select Advanced you can specify custom IIS Express and runtime settings:
In Server, select an IIS Express instance,
in Runtime version: a .NET Framework version,
in Port: an HTTP port, or select Use random port if you want dotCover to automatically select the port.
Click Edit Symbol Search Policy to specify where to search for PDB information.
Click Edit Filters to view existing and add new coverage filters. Note that the filters you add with this button are only applied to the current session.
- Click Run. dotCover will open the Coverage Controller dialog 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.
If the Collect profiling data from start check box 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.