Giter Club home page Giter Club logo

pspesivt / reportgenerator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from danielpalme/reportgenerator

1.0 2.0 0.0 1.44 MB

ReportGenerator converts XML reports generated by OpenCover, PartCover, Visual Studio or NCover into human readable reports in various formats.

Home Page: http://danielpalme.github.io/ReportGenerator

License: Apache License 2.0

C# 90.79% CSS 2.16% JavaScript 5.12% PowerShell 1.08% F# 0.40% Java 0.30% Batchfile 0.15%

reportgenerator's Introduction

ReportGenerator

ReportGenerator converts XML reports generated by OpenCover, PartCover, dotCover, Visual Studio, NCover, or Cobertura or 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. It is also possible to pass one XML file containing several reports to ReportGenerator (e.g. a build log file).

The following output formats are supported by ReportGenerator:

  • HTML, HTMLSummary, HTMLChart, MHTML
  • XML, XMLSummary
  • Latex, LatexSummary
  • TextSummary
  • CsvSummary
  • PngChart
  • Badges
  • Custom reports

Compatibility:

Also available as NuGet package: http://www.nuget.org/packages/ReportGenerator

Additional information about ReportGenerator can be found under Resources.

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

Screenshots

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

Badges

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

Sample badge

Usage

ReportGenerator is a commandline tool which requires the following parameters:

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

Explanations:
   Reports:           The coverage reports that should be parsed (separated by 
                      semicolon). Wildcards are allowed.
   Targetdirectory:   The directory where the generated report should be saved.
   Reporttypes:       The output formats and scope (separated by semicolon).
                      Values: Badges, Html, HtmlSummary, Latex, LatexSummary, TextSummary, Xml, XmlSummary
   SourceDirectories: Optional directories which contain the corresponding source code
                      (separated by semicolon).
                      The source files are used if coverage report contains classes
                      without path information.
   History directory: Optional directory for storing persistent coverage information.
                      Can be used in future reports to show coverage evolution.
   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.
                      Exclusion filters take precedence over inclusion filters.                      
                      Wildcards are allowed.
   Verbosity:         The verbosity level of the log messages.
                      Values: Verbose, Info, Error

Default values:
   -reporttypes:Html
   -assemblyfilters:+*
   -classfilters:+*
   -verbosity:Verbose

Examples:
   "-reports:coverage.xml" "-targetdir:C:\report"
   "-reports:target\*\*.xml" "-targetdir:C:\report" -reporttypes:Latex;HtmlSummary
   "-reports:coverage1.xml;coverage2.xml" "-targetdir:report"
   "-reports:coverage.xml" "-targetdir:C:\report" -reporttypes:Latex "-sourcedirs:C:\MyProject"
   "-reports:coverage.xml" "-targetdir:C:\report" "-sourcedirs:C:\MyProject1;C:\MyProject2" "-assemblyfilters:+Included;-Exclude
d.*"

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">
  <UsingTask TaskName="ReportGenerator" AssemblyFile="ReportGenerator.exe" />
  <ItemGroup>
    <CoverageFiles Include="partcover.xml" />
    <SourceDirectories Include="C:\MyProject1" />
    <SourceDirectories Include="C:\MyProject2" />
  </ItemGroup>
  <Target Name="Coverage">
    <ReportGenerator ReportFiles="@(CoverageFiles)" TargetDirectory="report" ReportTypes="Html;Latex" SourceDirectories="@(SourceDirectories)" HistoryDirectory="history" AssemblyFilters="+Include;-Excluded" VerbosityLevel="Verbose" />
  </Target>
</Project>

Resources

reportgenerator's People

Contributors

arielvb avatar danielpalme avatar jm3105 avatar loganek avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.