extentreports-dotnet-cli
extentreports-dotnet-cli copied to clipboard
Extent 5.0.1 Update
I have been trying to figure out how to generate a new .net core version of this cli tool with the latest Extent 5.0.1 update however my knowledge is very limited in .Net space. Anyway we could get some assistant with this?
Looking at the v5 notes it appears some breaking changes are introduced but im not sure how to deal with them?
https://www.extentreports.com/docs/versions/5/net/index.html#breaking-changes
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<PackAsTool>true</PackAsTool>
</PropertyGroup>
<PropertyGroup>
<AssemblyTitle>ExtentReportsDotNetCLI</AssemblyTitle>
<Description>Extend Framework, .NET CLI for Test Frameworks</Description>
<Company>AventStack</Company>
<Product>ExtentReportsDotNetCLI</Product>
<Copyright>Copyright © 2023</Copyright>
<!-- Version information for an assembly consists of the following four values:
Major Version
Minor Version
Build Number
Revision
You can specify all the values or you can default the Build and Revision Numbers
by using the '*' like "1.0.*" -->
<AssemblyVersion>0.1.0.0</AssemblyVersion>
<PackageVersion>0.1.0.0</PackageVersion>
<FileVersion>0.1.0.0</FileVersion>
<Authors>anshooarora</Authors>
<PackageProjectUrl>https://github.com/extent-framework/extentreports-dotnet-cli</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/extent-framework/extentreports-dotnet-cli/blob/master/LICENSE</PackageLicenseUrl>
<RepositoryUrl>https://github.com/extent-framework/extentreports-dotnet-cli</RepositoryUrl>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ExtentReports" Version="5.0.1" />
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.1.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="RazorEngine.NetCore.nixFix" Version="1.0.1" />
</ItemGroup>`
error CS1061: 'ExtentReports' does not contain a definition for 'StartedReporterList' and no accessible extension method 'StartedReporterList' accepting a first argument of type 'ExtentReports' could be found (are you missing a using directive or an assembly reference?)
error CS1061: 'ExtentReports' does not contain a definition for 'Stats' and no accessible extension method 'Stats' accepting a first argument of type 'ExtentReports' could be found (are you missing a using directive or an assembly reference?)
private int ProcessSingle(string testResultsFilePath, string output, bool merge = false)
{
_logger.WriteLine(LoggingLevel.Normal, $"Parsing test runner result file '{testResultsFilePath}' ...");
// if a single report is required for each test results file (ie, no merges):
// must instantiate every time to clear pre-existing data
if (!merge)
{
_extent = new ExtentReports();
}
if ((merge && !_extent.StartedReporterList.Any()) || !merge)
{
InitializeReporter(_extent, output);
}
new NUnitParser(_extent).ParseTestRunnerOutput(testResultsFilePath);
new JUnitParser(_extent).ParseTestRunnerOutput(testResultsFilePath);
_extent.Flush();
_filesProcessed++;
_logger.WriteLine(LoggingLevel.Normal, $"Report for '{testResultsFilePath}' is complete.");
return _extent.Stats.ChildCountFail;
}