NCover Documentation

NCover Bolt How To Guide

NCover Bolt is the latest NCover Visual Studio extension. Bolt is a multi-platform .NET profiler that offers built-in code coverage. Currently, Bolt can cover MSTest, NUnit and Test-Driven .NET tests.

Bolt can also cover your application run in Visual Studio.

Install and Register Bolt

  • Install/update NCover Desktop
  • Select the available Visual Studio extension plug-in check box(es) to include Bolt test runner with the install.
  • After Desktop is installed, open Visual Studio and confirm the NCover menu has been added to the Visual Studio main menu.

If you have an existing valid, licensed Desktop install, no further registration of Bolt should be necessary.

Reactivate or Relicense Bolt

  • From the VS NCover menu, select Bolt Licenses...
  • Enter a valid email address.
  • Enter the same valid NCover license key used to register the current install of Desktop.
  • If you've purchased a standalone Bolt license, enter it here.

One of the options within the Coverage Project sub-menu is the Default project option. The Default option will save all coverage information from a test run in the same directory that your solution is located in. This default data store is used when no NCover Desktop projects are assigned in the Bolt Coverage Project menu.

Connect to NCover Desktop

Bolt performs provides coverage metrics for the latest test run within Visual Studio. Linking your Bolt tests to Desktop provide an additional layer of functionality in the form of trend reporting across multiple executions of coverage and reporting features.

Bolt has access to all projects within Desktop. Bolt gives you the ability to select specific projects by clicking the NCover menu on the toolbar and selecting the desired project under the Coverage Project submenu. Selecting an existing Desktop project will display the coverage information from the most recent test run, if any is available.

After a Desktop project is selected, running a unit test using Bolt will automatically send coverage information to that project. When Bolt has profiled the tests and coverage collection is complete, the new coverage data will appear in Desktop automatically.

One of the options within the Coverage Project sub-menu is the Default project option. The Default option will save all coverage information from a test run in the same directory that your solution is located in. This default data store is used when no NCover Desktop projects are assigned in the Bolt Coverage Project menu.

Open NCover Desktop from Visual Studio

From the NCover menu, select Open NCover Desktop.

The NCover Desktop application will open in your default HTML5 compatible browser.

View Coverage Results

To see the full range of coverage information Bolt provides, select the following three options under NCover menu:

  • NCover > Enable Coverage
  • NCover > Highlight Code
  • NCover > Show Branch Coverage Visualization

Code Highlighting

With Highlight Code enabled, Bolt can provide a simple, intuitive visual display of which lines of code were tested and which lines were missed.

Lines of code in red are untested, while lines highlighted in green were exercised by a unit test.

Branch Coverage Visualization

With Show Branch Coverage Visualization enabled, you can also see Bolt's branch coverage visualization for your source code.

This visualization represents how the code was executed; by hovering over each sequence, you can see each path of each independent code segment that was run.

Each green dot represents a covered sequence point, and a red diamond represents an uncovered sequence point.

Pre-Coverage Filters

On the Bolt Code Coverage sub-menu, click on Filters... to open the Pre-Coverage Filters window.

This menu allows the user to select which assemblies to be profiled from the projects defined in a solution.

You can click to disable the Pre-Coverage Filters. You can also Select or Deselect all available options.

View Unit Test Coverage

Start Visual Studio and run tests from your preferred test runner.

Bolt will automatically profile your tested code.

Bolt Code Coverage Window

View coverage information and source code highlighting in the Bolt Code Coverage window.

To access this window, click on the NCover menu from the VS top menu, select View > Bolt Code Coverage. A dockable window will display, containing Branch Coverage, Sequence Coverage, and several other metrics in a tree-view.

You can browse the tree-view and click to expand your covered modules, displaying the coverage numbers all the way down to the individual test.

At the individual test level, click on 'Show in Editor' in the Bolt Code Coverage menu to display source code.

Note: The Bolt Code Coverage window displays coverage results for the most recent successful test run only.

Bolt saves data in the "Default" project (listed in the NCover > Coverage project submenu).

Bolt Output Window

The Bolt output window is available in the Visual Studio output window when tests are run.

The output window is not automatically activated, but the Bolt output is made active within the window, if the user chooses to view it.

Change Bolt settings

From the VS NCover menu, select Bolt Options.

The Options window will display, which allows you to select/deselect the "Show coverage highlighting" and "Show branch coverage visualization" options.

You can also change the satisfactory/unsatisfactory highlight colors here.

Bolt Data Location

The Bolt Data Location field allows a user to select an alternate location for Bolt data storage. This is a global setting for Visual Studio. Bolt's default behavior is to store all data locally in the solution folder under a uniquely named folder.

The Bolt Data Location field allows a user to place data for all solutions into a secondary location separated into subfolders by solution name. The user need only specify the containing folder, and then solution folders are created beneath that main location as needed.

If you still need technical assistance, we can help:

Submit A Support Ticket

Try NCover Free Contact Us Online