dotCover 2016.1 Help

Windows Service

Ctrl+Alt+K,K

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

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

With dotCover, you can run manual test sessions for Windows services.

Before you start analyzing coverage for a Windows service, make sure that your service is installed in the system. For more information on installing and uninstalling Windows services, see How to: Install and Uninstall Services

To start a manual test session for a Windows service

  1. Do one of the following:
    • In Visual Studio, press Ctrl+Alt+K,K or choose ReSharper | Cover | Cover Application... in the main menu
    • In dotCover standalone application, press Ctrl+Alt+K,K or choose File | Cover Application... in the menu.
  2. In the Coverage Configuration dialog box that appears, choose Windows Service.
    Note that you must have Administrator permissions to start a manual test session for a Windows service.
  3. In the Service drop-down list, choose a service that you want to run.
  4. Optionally, tick the Advanced check box to configure additional settings:
    • If you need to pass any command-line arguments, type them in the Arguments field or click the ellipsis button and choose a file to append to the argument string.
    • If you want dotCover to run and analyze coverage of all dependent services.child processes, tick the Start Dependent Services check-box.
    • 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.
  5. Click Run. dotCover will open the Coverage Controller dialog box and then start or restart the selected service.
  6. If the Start immediately check box was selected, the test session is started immediately. Otherwise, dotCover waits until you click Start in the Coverage Controller dialog box. When the test session is started, you can record code coverage in the test session.

See Also

Last modified: 19 August 2016