altcover.visualizer 8.8.53

dotnet tool install --global altcover.visualizer --version 8.8.53                
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local altcover.visualizer --version 8.8.53                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=altcover.visualizer&version=8.8.53                
nuke :add-package altcover.visualizer --version 8.8.53                

altcover.visualizer

A global tool for displaying code coverage in a number of formats (NCover 1.x, OpenCover, LCov, Cobertura, coverlet,...), using the the cross-platform AvaloniaUI toolkit

Visualizer screenshot

User Guide

Full wiki page here

Here's the simple naming of parts

Annotated

The recently accessed list is a drop-down for quick access to coverage files of current interest. The Refresh option is there for reloading the file you're currently examining e.g. after doing another test run.

The tree view opens with just the node for the coverage file shown. Drill down to the method of interest and double-click to load the appropriate source file.

The tree view shows the structure of the assemblies in the report, including virtual groupings for modules (classes that only contain classes, so have no presence in the XML reports), for properties (get_ and/or set_), and for events (add_ and/or remove_). Also where a type is just a function (i.e. only has an Invoke method), there is separate icon for that.

Colouring

A painter's algorithm approach is used -- first the whole source file is drawn, then the covered sections, then the un-covered ones, and finally any special cases. This approach ensures that the uncovered code is shown explicitly and is not obscured when some of the line, or a multi-line enclosing sequence point, happens to be covered : it's the unflattering view for engineers, rather than the sea of green for managers.

If the coverage file contains branch information, then an icon is shown in the left margin, in red-on-white for uncovered, black-on-yellow for partial coverage and black-on-pale green for complete coverage, with the details in tool-tip text for that icon.

The source is rendered by default in grey-on-whitesmoke; covered sequence-points are painted a medium blue, and then uncovered code is painted in crimson.

With coverage generated from AltCover with the --showstatic option, normally ignored code like auto-properties is shown in the report, and if not covered will appear as black, and with the --showGenerated option other code marked as [GeneratedCode] or [CompilerGenerated] shows as gold if not covered.

Annotated v6.6 - static and generated code

For purposes of demonstration, one test method here has been manually decorated with the [GeneratedCode] attribute; if the system under test uses code generation, marking it as such should be standard practice.

Source display font

From v7.1.783, this visualizer version also offers some limited font selection for source display

Tool-bar with font selection icon

  • On Windows, this uses the native FontChooser() API, restricting to monospace fonts (the default is "Courier New Normal 10")
  • Otherwise if the Tcl/Tk wish shell (assumed to be Tcl/Tk v8.6 or later) is on the PATH, the toolbar-icon is also shown. In the latter case, this spawns wish as a separate process to use its cross-platform font selection support; terminating the process when either a font selection is made (e.g. via Okor Apply), or the selection dialog is dismissed. There are no APIs there to restrict the font chooser to monospace fonts, so choose wisely (the default is "Monospace Normal 10")

Continuous Integration

Build GitHub Build statusBuild history
Test coverage Coveralls Coverage Status

Other NuGet Packages in this suite

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
8.8.53 11,511 5/16/2024
8.8.21 521 4/15/2024
8.8.10 319 4/6/2024
8.7.3 415 3/14/2024
8.6.125 2,008 1/4/2024
8.6.95 796 11/14/2023
8.6.68 13,620 7/10/2023
8.6.61 604 6/6/2023
8.6.48 5,840 3/22/2023
8.6.14 2,575 1/1/2023
8.5.842 666 12/25/2022
8.5.841 805 11/19/2022
8.4.840 913 10/17/2022
8.3.839 819 9/13/2022

This build from https://github.com/SteveGilham/altcover/tree/dad881f0e4bc930314670bd35e509764f2ecb9f3

Q. Never mind the fluff -- how do I get started?
A. Start with the Quick Start guide : https://github.com/SteveGilham/altcover/wiki/QuickStart-Guide and
read the FAQ : https://github.com/SteveGilham/altcover/wiki/FAQ

8.8.53 (Habu series release 29)
• [BUGFIX] Fix summary data for --outputFile option
• [BUGFIX] Fix interaction of --zipFile prepare option and --outputFile collect option
• [BUGFIX] Issue #220 - improve dependency resolution to the GAC

8.8.21 (Habu series release 28)
• [BREAKING; BUGFIX] Issue #206 : Update to net6+ for dotnet test integration and respect the $(IsTestProject) setting from the Microsoft.NET.Test.Sdk package.
• Simplify the use of the AltCover MSBuild tasks via the associated package-level .targets file by not even including the VSTest integration unless both '$(AltCover)' == 'true' AND '$(IsTestProject)' == 'true'.
• Mitigate instances of System.IO.IOException: The process cannot access the file '[coverage report]' because it is being used by another process.
• Explicitly add GAC locations to the paths inspected for dependency resolution

8.8.10 (Habu series release 27)
• [BUGFIX] Add Json member to the report format enumerations for the typesafe API and for the InvokeAltCover cmdlet.
• [BUGFIX] Issue #214 : patch Mono.Cecil to use FIPS compliant algorithm
• [Enhancement] Discussion #206, maybe also Issue #203 : Option --portable and equivalent APIs to place the coverage report file and related coverage data in the same folder as the recorder assembly, wherever that might be, allowing the whole instrumented folder structure to be moved into another file structure (e.g. different machine, different OS).

8.7.3 (Habu series release 26)
• [Enhancement] Discussion 202 : More careful tidying of temporary .runsettings files, fixing long-standing errors of both commission and omission.
• [Enhancement] Discussion 199 : Add /p:AltCoverOutputRoot=[path] and associated APIs for dotnet test command line creation.  The [path] is a directory to be used instead of $(TargetDir) for the relative placing of the instrumented or saved files.  The use-case here is when $(TargetDir) is close to MAX_PATH and the generated sub-folders would overflow that limit.

For previous releases (8.6.125 and earlier) go here -- https://github.com/SteveGilham/altcover/blob/master/ReleaseNotes%20-%20Previously.md