NCover Documentation

Getting Started With Basic Coverage

Installing NCover Desktop

NCover Desktop installs as a Windows service and sets global environment variables that allow it to access Microsoft's profiling ability. After install, the NCover service runs in the background, ready to cover any .NET applications or services on your desktop or virtual machine. Both 32 and 64 bit versions of the NCover profiler are installed and managed automatically, so there's no need to choose which version you need and install them separately.

Registering NCover Desktop

After Desktop is installed, logging in to the application for the first time will display the registration screen.

You have two registration options: connect to Code Central, or enter your key code and begin using the standalone Desktop.

Connecting to the Code Central Server

Since Desktop can send coverage data and create projects on Code Central, you're prompted to connect to the Code Central server at registration.

You can connect Desktop to Code Central anytime, as well:

From the NCover menu icon, Click Connect to Code Central Server.

Server URI -- Enter the address of the local host and the port for the Code Central server. This defaults to 127.0.0.1:11233 at installation, but will connect to whatever IP you specify for Code Central.

Username - A valid username as entered in the Admin section of Code Central.

Password - A valid password for the username entered above.

Click on Login and Activate and Desktop will contact the Code Central server. If the connection info you entered is valid and the Code Central service is running, a success message will display.

The NCover menu shows you that Desktop is connected to Code Central.

Registering Standalone Desktop

The other option for Desktop at registration is to enter your trial key code and begin using the standalone application.

Key code - Enter the license key code from your purchase order or invoice.

Email - Enter a valid e-mail address.

Click on Activate Key Code and Desktop will contact the NCover license server. If the key you entered is valid and active, a success message will display.

Now you're ready to create a project and start collecting coverage!

Covering an Application/Manual Testing

NCover Desktop runs as a service, so it's already monitoring, ready to cover any .NET code executing on your machine.

This ability to gather data globally is key to understanding how to leverage the power of NCover Desktop. When starting any project the first question you should ask is, What process do I want to cover? If Desktop can find the executable or service that's exercising your code, it can collect coverage data.

Creating a New Project

From the Home view of the NCover Desktop, click to open the "Create a New Project" window.

Match Rules

When the "Processes" tab displays, name your project and then select one of two methods to specify the processes to be covered.

Note: If you're setting up coverage for a process running locally on the machine where Code Central is installed, you can let Auto-Configure create project settings for you (see step 3 below).

You can also set up match rules manually, if you prefer.

The two match type options are Regex and Exe.

Let's say you want to monitor the NCover code coverage game, Code Blaster. Regex is a good choice in this case. The Regex option would be simply "CodeBlaster", or "codeblaster" -- the regex isn't case-sensitive.

The Exe option tells the NCover profiler to match on the executable name.

You can also use a file path if you want to profile a process only when it runs from a specific location.

Auto-Configure

You can click on the Auto-Configure button and let NCover create project settings for you.

The Processes tab will switch to the Auto-Detection view and start monitoring for .NET processes as soon as you click on Auto-Configure.

Start the CodeBlaster application, and the executables and assemblies that are being loaded will display in the detection window.

Note: If the process you want to profile is already running, you must re-start it in order for NCover to detect it.

Note: All modules are automatically included when the default "No filter" option is selected.

Switch the Pre-Coverage filter radio button to "Create filter" to review the "Modules to cover" and decide whether to include or exclude modules from the list.

Click the checkbox beside each module once to mark with an X to exclude the module. Click twice to mark with a check to include the module.

Note: You can specifically exclude modules by placing an X beside them on this screen, but any modules that are not specifically included will not be profiled, anyway. In other words, not creating an include is functionally the same as creating an exclude rule.

The selections shown above create the filter rules seen below when you click on the Filters tab.

Go the "Processes" tab and click Save to accept these selections, or Re-detect processes to start over.

Collecting Coverage

When your project selections are complete, re-start your application and run your manual tests. Go to the Home page and you'll see that the light beside your enabled project is pulsing green to indicate coverage is being collected.

Immediately to the right of your project name, the Modules Collecting counter displays the number of modules being profiled in the current execution of your project. The number will change while coverage is running, but the counter should eventually disappear when profiling is complete.

When testing is complete, close your tested application and NCover will automatically start compiling the coverage data.

Now that you have coverage data, what does the data mean?

If you still need technical assistance, we can help:

Submit A Support Ticket