altcover.visualizer
8.6.68
See the version list below for details.
dotnet tool install --global altcover.visualizer --version 8.6.68
dotnet new tool-manifest # if you are setting up this repo dotnet tool install --local altcover.visualizer --version 8.6.68
#tool dotnet:?package=altcover.visualizer&version=8.6.68
nuke :add-package altcover.visualizer --version 8.6.68
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
User Guide
Full wiki page here
Here's the simple naming of parts
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.
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
- 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 thePATH
, the toolbar-icon is also shown. In the latter case, this spawnswish
as a separate process to use its cross-platform font selection support; terminating the process when either a font selection is made (e.g. viaOk
orApply
), 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 |
Test coverage | Coveralls |
Other NuGet Packages in this suite
- General purpose install -- excludes the
dotnet test
API with FAKE and CAKE integration and the AvaloniaUI visualizer - API install -- excludes the visualizer in all forms
- dotnet global tool install -- excludes the visualizer in all forms
- FAKE build task utilities -- just AltCover related helper types for FAKE scripts (v5.23.0 or later), only in this package
- Cake build task utilities -- just AltCover related helper types for Cake scripts (v2.0.0 or later), only in this package
Product | Versions 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. |
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/09a552c4519e945255944ca55568c228722a27b1
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.6.68 (Habu series release 23)
• Omit anonymous types from coverage, in the same way as other compiler generated code (auto-properties, equality and related operations on F# distributed unions, etc.)
• Supports net8.0 preview 5
8.6.61 (Habu series release 22)
• [BUGFIX] prevent possible "The lists had different lengths." exception in the collect phase (Issue 181)
• Removes some obsolete code from the dotnet test integration
• Drop support for Fake 5.23.x
• Supports net8.0 preview 4
• Updated to Cecil 11.5, removing the need for workrounds for issues noted at 11.4
• Other dependency updates.
8.6.48 (Habu series release 21a)
• [BUGFIX] Correctly package the visualizer for net5.0, as well as building it against the later platform
8.6.45 (Habu series release 21)
• [BUGFIX] Issue #179 - Improve and strengthen the heuristic for locating dependent assemblies, prossibly slightly speeding the look-up in the process by eliminating potentially duplicated effort.
8.6.40 (Habu series release 20)
• [BUGFIX] Issue #178 - possible NRE when instrumenting woven code e.g. using Fody
• [AvaloniaVisualizer] Now requires net5.0 or later
• Supports Fake 6.0.0. This is probably the last release that will support earlier versions, as 5.23.1 is almost 6 months old.
• Supports net8.0 previews 1,2 (so far, no nasty surprises like with the 7.0.100 release)
8.6.14 (Habu series release 19)
• [GTKVisualizer] Fix an off-by-one crash for coverlet generated files
• [AvaloniaVisualizer] Fix possible crash launching the About dialog
• [Visualizer] Display coverage percentages against nodes of the tree (known issue that the synthetic F# module nodes are not thus decorated)
• [Visualizer] Improve handling of larger coverage files by deferring more processing until the tree model is actually expanded.
• [API] Types Options.CLI, Options.Logging, Options.Prepare and Options.Collect in namespace AltCover; concrete implementations of the ICLIOptions, ILoggingOptions and IPrepareOptions and ICollectOptions respectively, with getter and setter for each property. Default values for the latter two are as per the corresponding Primitive record types.
• [API] Also on the AltCover.Fake package in the AltCoverFake.DotNet.Testing namespace (except Options.Logging which is not useful in that context)
8.5.842 (Habu series release 18)
• [VISUALIZER] As the relevant Avalonia issue is long resolved, move to having separate dialog boxes for the Avalonia Visualizer's "About" and message box, as in the GTK# version.
• ref struct types have an autogenerated [Obsolete] attribute with a standard comment - detect and ignore such attributes. See https://turnerj.com/blog/ref-structs-are-technically-obsolete for details.
8.5.841 (Habu series release 17)
• To support Cake 3.0, move the Cake API assembly from AltCover.Api to a new package AltCover.Cake; this contains libraries built against Cake 2.0.0 at netcoreapp3.1 as well as the old ones built against Cake 1.0.0 at netstandard2.0 (present but in practice obsolete).
• Following Fake.build's policy of deprecating releases older then 6 month, drop support for versions before 5.23
• [BREAKING] Rename AltCover.Cake.DotNet.DotNetCoreTest to AltCover.Cake.DotNet.DotNetTest (even in the obsolete 1.0.0 build) to match the changes in the Cake APIs (and consequent chage to the test setting type in the argument list). Similarly, in the version >= 2.0.0 build, the type AltCover.Cake.DotNet is now a [CakeAliasCategory("DotNet")] rather than [CakeAliasCategory("DotNetCore")]
• [API] New DotNet APIs for Fake support - ToTestPropertiesList method to emit a list of (name,value) pairs to allow customised property passing to dotnet test in the wake of the v7.0.100 regression.
• [API] Additionally ImportModuleProperties and GetVersionProperties values that are additonal lists of (name,value) pairs to append as needed.
For previous releases (8.4.840 and earlier) go here -- https://github.com/SteveGilham/altcover/blob/master/ReleaseNotes%20-%20Previously.md