Skip to content

Commit

Permalink
Merge branch 'v4'
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpalme committed Oct 19, 2018
2 parents 564f305 + 7a6b34f commit d909230
Show file tree
Hide file tree
Showing 292 changed files with 15,178 additions and 10,444 deletions.
45 changes: 26 additions & 19 deletions README.md
@@ -1,5 +1,5 @@
# ReportGenerator
*ReportGenerator* converts XML reports generated by OpenCover, dotCover, Visual Studio, NCover or Cobertura into human readable reports in various formats.
*ReportGenerator* converts XML reports generated by OpenCover, dotCover, Visual Studio, NCover, Cobertura or JaCoCo 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.

Expand All @@ -13,6 +13,7 @@ The following [output formats](https://github.com/danielpalme/ReportGenerator/wi
* Latex, LatexSummary
* TextSummary
* CsvSummary
* PngChart
* Badges
* [Custom reports](https://github.com/danielpalme/ReportGenerator/wiki/Custom-reports)

Expand All @@ -23,6 +24,7 @@ The following [output formats](https://github.com/danielpalme/ReportGenerator/wi
* Visual Studio ([vstest.console.exe](https://github.com/danielpalme/ReportGenerator/wiki/Visual-Studio-Coverage-Tools#vstestconsoleexe), [CodeCoverage.exe](https://github.com/danielpalme/ReportGenerator/wiki/Visual-Studio-Coverage-Tools#codecoverageexe))
* [NCover](https://www.ncover.com/info/download) (tested version 1.5.8, other versions may not work)
* [Cobertura](https://github.com/cobertura/cobertura)
* [JaCoCo](https://www.jacoco.org/jacoco/index.html)
* Mono ([mprof-report](https://www.mono-project.com/docs/debug+profile/profile/profiler/#analyzing-the-profile-data))

Additional information about *ReportGenerator* can be found under [Resources](#resources).
Expand Down Expand Up @@ -52,30 +54,35 @@ 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>["]]
[["]-tag:<tag>["]]
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, Cobertura, CsvSummary, Html, HtmlChart, HtmlSummary, Latex, LatexSummary, MHtml,
PngChart, TextSummary, Xml, XmlSummary
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.
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
Tag: Optional tag or build version.
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, Cobertura, CsvSummary, Html, HtmlChart, HtmlSummary, Latex, LatexSummary, MHtml,
PngChart, 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.
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
Tag: Optional tag or build version.
Default values:
-reporttypes:Html
Expand All @@ -87,7 +94,7 @@ Default values:
Examples:
"-reports:coverage.xml" "-targetdir:C:\report"
"-reports:target\*\*.xml" "-targetdir:C:\report" -reporttypes:Latex;HtmlSummary -tag:v1.4.5
"-reports:coverage1.xml;coverage2.xml" "-targetdir:report"
"-reports:coverage1.xml;coverage2.xml" "-targetdir:report" "-sourcedirs:C:\MyProject" -plugins:CustomReports.dll
"-reports:coverage.xml" "-targetdir:C:\report" "-assemblyfilters:+Included;-Excluded.*"
```

Expand All @@ -111,7 +118,7 @@ A MSBuild task also exists:
<CoverageFiles Include="OpenCover.xml" />
</ItemGroup>
<Target Name="Coverage">
<ReportGenerator ReportFiles="@(CoverageFiles)" TargetDirectory="report" ReportTypes="Html;Latex" HistoryDirectory="history" AssemblyFilters="+Include;-Excluded" VerbosityLevel="Verbose" />
<ReportGenerator ReportFiles="@(CoverageFiles)" TargetDirectory="report" ReportTypes="Html;Latex" HistoryDirectory="history" Plugins="CustomReports.dll" AssemblyFilters="+Include;-Excluded" VerbosityLevel="Verbose" />
</Target>
</Project>
```
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Expand Up @@ -24,7 +24,7 @@ <h1>ReportGenerator</h1>
<div class="carousel-inner">
<div class="item active">
<h2 class="hidden-xs">ReportGenerator</h2>
<h3>ReportGenerator converts XML reports generated by <br />OpenCover, dotCover, Visual Studio, NCover or Cobertura<br /> into human readable reports in various formats</h3>
<h3>ReportGenerator converts XML reports generated by <br />OpenCover, dotCover, Visual Studio, NCover, Cobertura or JaCoCo<br /> into human readable reports in various formats</h3>
</div>
<div class="item">
<h2 class="hidden-xs">Custom Reports</h2>
Expand Down
Binary file modified docs/resources/CustomExtensions_v4.zip
Binary file not shown.
Binary file modified docs/resources/SampleReports.zip
Binary file not shown.
Binary file modified docs/resources/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 58 additions & 16 deletions docs/usage.html
Expand Up @@ -37,7 +37,7 @@ <h4>NuGet Package</h4>
</div>

<h3>Reports</h3>
<div class="alert alert-info">Path to the coverage report(s) that should be parsed.<br/>Wildcards are allowed.</div>
<div class="alert alert-info">Path to the coverage report(s) that should be parsed.<br/>Globbing is supported.</div>
<div class="form-group" ng-repeat="report in reports track by $index">
<div ng-class="{ 'input-group': $index > 0}">
<input type="text" class="form-control" placeholder="The path of the coverage file" ng-model="reports[$index]" required />
Expand Down Expand Up @@ -68,7 +68,20 @@ <h3>Report types</h3>
<h3>History directory</h3>
<div class="alert alert-info">Optional directory for storing <b>persistent</b> coverage information. Choose a directory which does not get deleted between builds.<br/>Required to show the history chart in the HTML reports.</div>
<div class="form-group">
<input type="text" class="form-control" placeholder="The history directory." ng-model="historydir" />
<input type="text" class="form-control" placeholder="The history directory." ng-model="historydir" ng-required="(reporttypes | filter: { checked: true, requiresHistoryDir: true }).length > 0" />
</div>
<br/>

<h3>Plugins</h3>
<div class="alert alert-info">Optional plugin files for <a href="https://github.com/danielpalme/ReportGenerator/wiki/Custom-reports">custom reports</a> or <a href="https://github.com/danielpalme/ReportGenerator/wiki/Custom-history-storage">custom history storage</a>.</div>
<div class="form-group" ng-repeat="plugin in plugins track by $index">
<div ng-class="{ 'input-group': $index > 0}">
<input type="text" class="form-control" placeholder="The path of the plugin" ng-model="plugins[$index]" required />
<span class="input-group-addon" ng-click="removePlugin($index)" ng-if="$index > 0"><a href=""><i class="fa fa-trash text-danger"></i></a></span>
</div>
</div>
<div class="form-group">
<a href="" ng-click="addPlugin()" class="text-info"><i class="fa fa-plus-circle"></i> Add plugin</a>
</div>
<br/>

Expand Down Expand Up @@ -188,7 +201,7 @@ <h4>Usage</h4>
runtimes: '.NET Core',
description: 'Use this package if your project is based on .NET Core and you want to use ReportGenerator as a \'DotnetCliTool\'.',
installoptions: [
{ tool: 'Manual', hint: 'Add the following element to your project file:', command: '<DotNetCliToolReference Include="dotnet-reportgenerator-cli" Version="x.y.z" />' }
{ tool: 'Manual', hint: 'Add the following element to your project file:', command: '<ItemGroup>\r\n <DotNetCliToolReference Include="dotnet-reportgenerator-cli" Version="x.y.z" />\r\n</ItemGroup>' }
],
executables: [{ runtime: '.NET Core', tool: 'dotnet reportgenerator' }]
},
Expand All @@ -210,21 +223,23 @@ <h4>Usage</h4>
$scope.reports = ['OpenCover.xml'];
$scope.targetdir = 'coveragereport';
$scope.reporttypes = [
{ name: 'HTML', description: 'The default output format. Creates a summary overview (index.htm) and detailed reports for each class.', checked: true },
{ name: 'HTMLSummary', description: 'Creates a single HTML file (summary.htm) without links.', checked: false },
{ name: 'HTMLInline', description: 'Same as HTML but CSS and JavaScript is included in every HTML page. This results in larger file sizes, but can be useful for integration into build servers like VSTS, since they may block referenced CSS and JavaScript files.', checked: false },
{ name: 'HTMLChart', description: 'Creates a single HTML file containing a chart with historic coverage information.', checked: false },
{ name: 'MHTML', description: 'Same as HTML but packaged into a single MHTML file.', checked: false },
{ name: 'Cobertura', description: 'Creates a XML file in Cobertura format. This format integrates with tools like VSTS or Jenkins.', checked: false },
{ name: 'XML', description: 'Creates a XML file containing a summary for all classes and detailed reports for each class.', checked: false },
{ name: 'XMLSummary', description: 'Creates a single XML file containing a summary for all classes.', checked: false },
{ name: 'Latex', description: 'Creates a single TEX file containing a summary for all classes and detailed reports for each class.', checked: false },
{ name: 'LatexSummary', description: 'Creates a single TEX file containing a summary for all classes.', checked: false },
{ name: 'TextSummary', description: 'Creates a single TXT file containing coverage information per class.', checked: false },
{ name: 'CsvSummary', description: 'Creates a single CSV file containing coverage information per class.', checked: false },
{ name: 'Badges', description: 'Creates three SVG and two PNG files that show line and/or branch coverage information.', checked: false }
{ name: 'HTML', description: 'The default output format. Creates a summary overview (index.htm) and detailed reports for each class.', requiresHistoryDir: false, checked: true },
{ name: 'HTMLSummary', description: 'Creates a single HTML file (summary.htm) without links.', requiresHistoryDir: false, checked: false },
{ name: 'HTMLInline', description: 'Same as HTML but CSS and JavaScript is included in every HTML page. This results in larger file sizes, but can be useful for integration into build servers like Azure DevOps (VSTS), since they may block referenced CSS and JavaScript files.', requiresHistoryDir: false, checked: false },
{ name: 'HTMLChart', description: 'Creates a single HTML file containing a chart with historic coverage information.', requiresHistoryDir: true, checked: false },
{ name: 'MHTML', description: 'Same as HTML but packaged into a single MHTML file.', requiresHistoryDir: false, checked: false },
{ name: 'Cobertura', description: 'Creates a XML file in Cobertura format. This format integrates with tools like Azure DevOps (VSTS) or Jenkins.', requiresHistoryDir: false, checked: false },
{ name: 'XML', description: 'Creates a XML file containing a summary for all classes and detailed reports for each class.', requiresHistoryDir: false, checked: false },
{ name: 'XMLSummary', description: 'Creates a single XML file containing a summary for all classes.', requiresHistoryDir: false, checked: false },
{ name: 'Latex', description: 'Creates a single TEX file containing a summary for all classes and detailed reports for each class.', requiresHistoryDir: false, checked: false },
{ name: 'LatexSummary', description: 'Creates a single TEX file containing a summary for all classes.', requiresHistoryDir: false, checked: false },
{ name: 'TextSummary', description: 'Creates a single TXT file containing coverage information per class.', requiresHistoryDir: false, checked: false },
{ name: 'CsvSummary', description: 'Creates a single CSV file containing coverage information per class.', requiresHistoryDir: false, checked: false },
{ name: 'PngChart', description: 'Creates a single PNG file containing a chart with historic coverage information.', requiresHistoryDir: true, checked: false },
{ name: 'Badges', description: 'Creates three SVG and two PNG files that show line and/or branch coverage information.', requiresHistoryDir: false, checked: false }
];
$scope.historydir = null;
$scope.plugins = [];
$scope.assemblyfilters = [];
$scope.classfilters = [];
$scope.filefilters = [];
Expand All @@ -238,6 +253,14 @@ <h4>Usage</h4>
$scope.reports.splice(index, 1);
}

$scope.addPlugin = function() {
$scope.plugins.push(null);
}

$scope.removePlugin = function(index) {
$scope.plugins.splice(index, 1);
}

$scope.addAssemblyFilter = function() {
$scope.assemblyfilters.push(null);
}
Expand Down Expand Up @@ -308,6 +331,25 @@ <h4>Usage</h4>
result += $scope.historydir;
result += '"';
}

if ($scope.plugins.length > 0) {
result += '\r\n';
result += '"-plugins:';

for (var i = 0; i < $scope.plugins.length; i++) {
if ($scope.plugins[i] === null || $scope.plugins[i] === undefined || $scope.plugins[i].length === 0) {
continue;
}

if (i > 0) {
result += ';';
}

result += $scope.plugins[i];
}

result += '"';
}

if ($scope.assemblyfilters.length > 0) {
result += '\r\n';
Expand Down
3 changes: 2 additions & 1 deletion src/.gitignore
Expand Up @@ -9,4 +9,5 @@
*.user
*.Cache
bin
obj
obj
.DS_Store
8 changes: 4 additions & 4 deletions src/Deployment/chocolatey/reportgenerator.portable.nuspec
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>reportgenerator.portable</id>
<version>3.0.0.0</version>
<version>4.0.0.0</version>
<title>ReportGenerator (Portable) - Generates reports for various code coverage tools</title>
<authors>Daniel Palme</authors>
<owners>Daniel Palme</owners>
Expand All @@ -12,10 +12,10 @@
<packageSourceUrl>https://github.com/danielpalme/ReportGenerator</packageSourceUrl>
<docsUrl>https://github.com/danielpalme/ReportGenerator/wiki</docsUrl>
<bugTrackerUrl>https://github.com/danielpalme/ReportGenerator/issues</bugTrackerUrl>
<iconUrl>http://danielpalme.github.io/ReportGenerator/resources/logo.png</iconUrl>
<iconUrl>http://danielpalme.github.io/ReportGenerator/resources/logo_512.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>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 line has been covered.</description>
<summary>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 line has been covered.</summary>
<description>ReportGenerator converts XML reports generated by OpenCover, dotCover, Visual Studio, NCover, Cobertura or JaCoCo 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 line has been covered.</description>
<summary>ReportGenerator converts XML reports generated by OpenCover, dotCover, Visual Studio, NCover, Cobertura or JaCoCo 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 line has been covered.</summary>
<language>en-US</language>
<tags>Code Coverage Reporting Testing TDD Utility</tags>
</metadata>
Expand Down
6 changes: 6 additions & 0 deletions src/Deployment/nuget/DotnetToolSettings.xml
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<DotNetCliTool Version="1">
<Commands>
<Command Name="reportgenerator" EntryPoint="ReportGenerator.dll" Runner="dotnet" />
</Commands>
</DotNetCliTool>

0 comments on commit d909230

Please sign in to comment.