All Projects → danielpalme → Reportgenerator

danielpalme / Reportgenerator

Licence: apache-2.0
ReportGenerator converts coverage reports generated by coverlet, OpenCover, dotCover, Visual Studio, NCover, Cobertura, JaCoCo, Clover, gcov or lcov into human readable reports in various formats.

Projects that are alternatives of or similar to Reportgenerator

Fastreport
Free Open Source Reporting tool for .NET6/.NET Core/.NET Framework that helps your application generate document-like reports
Stars: ✭ 1,688 (+32.29%)
Mutual labels:  reporting, dotnet-core
Coverlet
Cross platform code coverage for .NET
Stars: ✭ 2,303 (+80.49%)
Mutual labels:  dotnet-core, code-coverage
jacoco-report
Github action that publishes the JaCoCo report as a comment in the Pull Request
Stars: ✭ 31 (-97.57%)
Mutual labels:  reporting, code-coverage
Minicover
Cross platform code coverage tool for .NET Core
Stars: ✭ 193 (-84.87%)
Mutual labels:  dotnet-core, code-coverage
Altcover
Cross-platform coverage gathering and processing tool set for .net/.net core and Mono
Stars: ✭ 344 (-73.04%)
Mutual labels:  dotnet-core, code-coverage
Dotnet Template Onion
Onion Architecture with .NET 5/.NET Core and CQRS/Event Sourcing following a DDD approach
Stars: ✭ 70 (-94.51%)
Mutual labels:  dotnet-core
Maven Examples
List of Maven examples
Stars: ✭ 79 (-93.81%)
Mutual labels:  code-coverage
Grpc Demos
Demos for my talk Beyond HTTP in ASP.NET Core 3.0 with gRPC
Stars: ✭ 74 (-94.2%)
Mutual labels:  dotnet-core
Jmeter Elasticsearch Backend Listener
JMeter plugin that lets you send sample results to an ElasticSearch engine to enable live monitoring of load tests.
Stars: ✭ 72 (-94.36%)
Mutual labels:  reporting
Linq To Astar
A* written in C#, used with LINQ.
Stars: ✭ 87 (-93.18%)
Mutual labels:  dotnet-core
Texreg
Conversion of R Regression Output to LaTeX or HTML Tables
Stars: ✭ 85 (-93.34%)
Mutual labels:  reporting
Repodb
A hybrid ORM library for .NET.
Stars: ✭ 1,223 (-4.15%)
Mutual labels:  dotnet-core
Asyncworkercollection
高性能的多线程异步工具库。A collection of tools that support asynchronous methods and support high-performance multithreading.
Stars: ✭ 74 (-94.2%)
Mutual labels:  dotnet-core
Sentinl
Kibana Alert & Report App for Elasticsearch
Stars: ✭ 1,233 (-3.37%)
Mutual labels:  reporting
Telegram.bot.framework
Simple framework for building Telegram bots
Stars: ✭ 73 (-94.28%)
Mutual labels:  dotnet-core
Jsonapiframework
JsonApiFramework is a fast, extensible, and portable .NET framework for the reading and writing of JSON API documents. Currently working on ApiFramework 1.0 which is a new framework that supports the many enhancements documented in the 2.0 milestone of this project while being media type agnostic but will support media types like {json:api} and GraphQL for serialization/deserialization purposes.
Stars: ✭ 85 (-93.34%)
Mutual labels:  dotnet-core
Ara
ARA Records Ansible and makes it easier to understand and troubleshoot.
Stars: ✭ 1,176 (-7.84%)
Mutual labels:  reporting
Teamcity Dotnet Plugin
TeamCity plugin for .NET Core projects
Stars: ✭ 77 (-93.97%)
Mutual labels:  dotnet-core
Piranha.core
Piranha CMS is the friendly editor-focused CMS for .NET Core that can be used both as an integrated CMS or as a headless API.
Stars: ✭ 1,242 (-2.66%)
Mutual labels:  dotnet-core
Pyreportjasper
Python Reporting with JasperReports
Stars: ✭ 77 (-93.97%)
Mutual labels:  reporting

ReportGenerator
ReportGenerator

Powerful code coverage visualization

GitHub license Build Status Coverage

ReportGenerator converts coverage reports generated by coverlet, OpenCover, dotCover, Visual Studio, NCover, Cobertura, JaCoCo, Clover, gcov or lcov into human readable reports in various formats.

The reports do not only show the coverage quota, but also include the source code and visualize which lines have been covered.

ReportGenerator supports merging several reports into one.

Input and output

License

Getting started

ReportGenerator is a commandline tool which works with full .NET Framework and .NET Core.
Use the online configuration tool to get started quickly.

Install the package matching your platform and needs

Package Platforms Installation/Usage
ReportGenerator

NugetNuget
.NET Core 2.x, 3.x, 5.x
.NET Framework 4.7
Use this package if your project is based on .NET Framework or .NET Core and you want to use ReportGenerator via the command line or a build script.

Usage
dotnet $(UserProfile).nuget\packages\reportgenerator\x.y.z\tools\net5.0\ReportGenerator.dll [options]
$(UserProfile).nuget\packages\reportgenerator\x.y.z\tools\net5.0\ReportGenerator.exe [options]

$(UserProfile)\.nuget\packages\reportgenerator\x.y.z\tools\net47\ReportGenerator.exe [options]
dotnet-reportgenerator-globaltool

NugetNuget
.NET Core 2.1, 3.x Use this package if your project is based on .NET Core and you want to use ReportGenerator as a (global) 'DotnetTool'.

Installation
dotnet tool install -g dotnet-reportgenerator-globaltool

dotnet tool install dotnet-reportgenerator-globaltool --tool-path tools

dotnet new tool-manifest
dotnet tool install dotnet-reportgenerator-globaltool

Usage
reportgenerator [options]
tools\reportgenerator.exe [options]
dotnet reportgenerator [options]
ReportGenerator.Core

NugetNuget
.NET Standard 2.0 Use this package if you want to write a custom plugin for ReportGenerator or if you want to call/execute ReportGenerator within your code base.

Plugin development
Custom reports
Custom history storage
Azure DevOps extension

Visual Studio Marketplace VersionVisual Studio Marketplace Installs - Azure DevOps Extension
.NET Core >=2.1 Add the Azure DevOps extension to your build pipeline.
Learn more
GitHub Actions .NET Core >=2.1 Add the GitHub Action to your build pipeline.
Learn more

Usage / Command line parameters

Parameters:
    ["]-reports:<report>[;<report>][;<report>]["]
    ["]-targetdir:<target directory>["]
    [["]-reporttypes:<Html|HtmlSummary|...>[;<Html|HtmlSummary|...>]["]]
    [["]-sourcedirs:<directory>[;<directory>][;<directory>]["]]
    [["]-historydir:<history directory>["]]
    [["]-plugins:<plugin>[;<plugin>][;<plugin>]["]]
    [["]-assemblyfilters:<(+|-)filter>[;<(+|-)filter>][;<(+|-)filter>]["]]
    [["]-classfilters:<(+|-)filter>[;<(+|-)filter>][;<(+|-)filter>]["]]
    [["]-filefilters:<(+|-)filter>[;<(+|-)filter>][;<(+|-)filter>]["]]
    [["]-verbosity:<Verbose|Info|Warning|Error|Off>["]]
    [["]-title:<title>["]]
    [["]-tag:<tag>["]]

Explanations:
   Reports:            The coverage reports that should be parsed (separated by semicolon).
                       Globbing is supported.
   Target directory:   The directory where the generated report should be saved.
   Report types:       The output formats and scope (separated by semicolon).
                       Values: Badges, Clover, Cobertura, CsvSummary, Html, HtmlChart, HtmlInline, 
                       HtmlInline_AzurePipelines, HtmlInline_AzurePipelines_Dark, HtmlSummary,
                       JsonSummary, Latex, LatexSummary, lcov, MHtml, PngChart, SonarQube, TeamCitySummary,
                       TextSummary, Xml, XmlSummary
   Source directories: Optional directories which contain the corresponding source code (separated by semicolon).
                       The source directories are used if coverage report contains classes without path information.
                       Globbing is not supported.
   History directory:  Optional directory for storing persistent coverage information.
                       Can be used in future reports to show coverage evolution.
   Plugins:            Optional plugin files for custom reports or custom history storage (separated by semicolon). 
   Assembly filters:   Optional list of assemblies that should be included or excluded in the report.
   Class filters:      Optional list of classes that should be included or excluded in the report.
   File filters:       Optional list of files that should be included or excluded in the report.
                       Exclusion filters take precedence over inclusion filters.                      
                       Wildcards are allowed.
   Verbosity:          The verbosity level of the log messages.
                       Values: Verbose, Info, Warning, Error, Off
   Title:              Optional title.
   Tag:                Optional tag or build version.

Default values:
   -reporttypes:Html
   -assemblyfilters:+*
   -classfilters:+*
   -filefilters:+*
   -verbosity:Info

Examples:
   "-reports:coverage.xml" "-targetdir:C:\report"
   "-reports:target\*\*.xml" "-targetdir:C:\report" -reporttypes:Latex;HtmlSummary -title:IntegrationTest -tag:v1.4.5
   "-reports:coverage1.xml;coverage2.xml" "-targetdir:report" "-sourcedirs:C:\MyProject" -plugins:CustomReports.dll
   "-reports:coverage.xml" "-targetdir:C:\report" "-assemblyfilters:+Included;-Excluded.*"

.netconfig support

All the above parameters can also be persisted in a .netconfig file, under a [ReportGenerator] section. Examples:

[ReportGenerator]
	reports = coverage.xml
	targetdir = "C:\\report"
	reporttypes = Latex;HtmlSummary
	assemblyfilters = +Test;-Test
	classfilters = +Test2;-Test2

All the plural options can also be specified as multiple singular entries, like:

[ReportGenerator]
	report = coverage1.xml
	report = coverage2.xml
	reporttype = Latex
	reporttype = HtmlSummary
	assemblyfilter = +Test
	assemblyfilter = -Test
	classfilter = +Test2
	classfilter = -Test2
	filefilter = +cs
	filefilter = -vb
	sourcedir = src
	sourcedir = test

Adding/removing values is trivial using the dotnet-config CLI:

# set a single-valued variable
dotnet config reportgenerator.reporttypes Latex;HtmlSummary
# add to multi-valued variable
dotnet config --add reportgenerator.report coverage3.xml
# clear all multi-valued entries for a variable
dotnet config --unset-all reportgenerator.assemblyfilter

Of course it's equally trivial to just edit the .netconfig file by hand.

MSBuild

A MSBuild task also exists:

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Coverage" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
  <ItemGroup>
    <PackageReference Include="ReportGenerator" Version="x.y.z" />
  </ItemGroup>
  <Target Name="Coverage">
    <ItemGroup>
      <CoverageFiles Include="OpenCover.xml" />
    </ItemGroup>
    <ReportGenerator ProjectDirectory="$(MSBuildProjectDirectory)" ReportFiles="@(CoverageFiles)" TargetDirectory="report" ReportTypes="Html;Latex" HistoryDirectory="history" Plugins="CustomReports.dll" AssemblyFilters="+Include;-Excluded" VerbosityLevel="Verbose" />
  </Target>
</Project>

The MSBuild task parameters can be complemented with the .netconfig, if used. That means that parameters can be omitted if they are provided via .netconfig, which is useful when reusing fixed settings across multiple projects in a solution, where the MSBuild task is only provided the dynamic values for the current project:

Given the following .netconfig:

[ReportGenerator]
  reporttypes = Html;Latex
  targetdirectory = report
  historydirectory = history
  assemblyfilters = +Include;-Excluded
  verbosityLevel = Verbose

The above target could be simplified as:

  <Target Name="Coverage">
    <ItemGroup>
      <CoverageFiles Include="OpenCover.xml" />
    </ItemGroup>
    <ReportGenerator ProjectDirectory="$(MSBuildProjectDirectory)"
                     ReportFiles="@(CoverageFiles)" 
                     Plugins="CustomReports.dll" />
  </Target>

Supported input and output file formats

ReportGenerator supports several input and output formats.
The wiki explains the different output formats or you can download sample reports of all formats.
If you need a custom format, you can create a plugin.

Input formats Output formats

  • Html, HtmlSummary, HtmlInline, HtmlInline_AzurePipelines, HtmlInline_AzurePipelines_Dark, HtmlChart, MHtml
  • Clover
  • Cobertura
  • SonarQube
  • TeamCitySummary
  • lcov
  • Xml, XmlSummary
  • JsonSummary
  • Latex, LatexSummary
  • TextSummary
  • CsvSummary
  • PngChart
  • Badges
  • Custom reports

Screenshots

The screenshots show two snippets of the generated reports: Screenshot 1 Screenshot 2

Badges
Badges in SVG and PNG format can be generated if -reporttypes:Badges is used:

Sample badge

Resources

Visual Studio extensions

The following extensions exist to visualize coverage in Visual Studio: | Name | Coverage tool | Links | Comment | |:---------|:------------------|:----------|:------------| | AxoCover | OpenCover| GitHub
Marketplace | VS 2019 is not supported | | FineCodeCoverage | coverlet, OpenCover | GitHub
Marketplace | | | RunCoverletReport | coverlet | GitHub
Marketplace | |

Links

Download statistics

Nuget Nuget Nuget Nuget

Visual Studio Marketplace Installs - Azure DevOps Extension GitHub All Releases Chocolatey

Trends

Nuget downloads
GitHub stars

Contact

Author: Daniel Palme
Blog: www.palmmedia.de
Twitter: @danielpalme

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].