Replies: 2 comments 3 replies
-
I would recommend to use ReportGenerator as a command line tool: If you really want to do this in code, you could use: string[] sourceDirectories = new string[]
{
};
string path = "JaCoCo0.8.3.xml";
var configuration = new ReportConfiguration(
new[] { path },
"C:\\temp",
sourceDirectories,
null,
new[] { "Cobertura" },
Array.Empty<string>(),
Array.Empty<string>(),
Array.Empty<string>(),
Array.Empty<string>(),
null,
null);
new Generator().GenerateReport(configuration); |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using the 5.1.12 version on .Net 6.0. I have a JaCoCo report as an input file, and I was trying to figure out a way to generate a Cobertura format using C# code directly, which will be hosted in the server.
I noticed there's a
CoberturaReportBuilder()
class, so I tried below code snippet:However, it throws error:
_System.NullReferenceException: Object reference not set to an instance of an object. at Palmmedia.ReportGenerator.Core.Reporting.Builders.CoberturaReportBuilder.CreateSummaryReport(SummaryResult summaryResult) in /_/src/ReportGenerator.Core/Reporting/Builders/CoberturaReportBuilder.cs:line 231_
Maybe that is due to theReportContext
property is null, which cannot be initialized.I am wondering what is the correct way to do this. Thank you.
Beta Was this translation helpful? Give feedback.
All reactions