Skip to content

extent.Flush() is failing for all of my reporting tests. #166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lior277 opened this issue Feb 28, 2023 · 2 comments
Open

extent.Flush() is failing for all of my reporting tests. #166

lior277 opened this issue Feb 28, 2023 · 2 comments

Comments

@lior277
Copy link

lior277 commented Feb 28, 2023

working lang c#
After updating NUnit3TestAdapter package from 4.3.1 to 4.4.0 I am getting exception at extent.Flush()
Here is the stack trace:
System.ArgumentException
HResult=0x80070057
Message=Expression of type 'CompiledRazorTemplates.Dynamic.RazorEngine_f3bdefe4093245f3900eab7bf2d014ca' cannot be used for return type 'RazorEngine.Templating.ITemplate'
Source=System.Linq.Expressions
StackTrace:
at System.Linq.Expressions.Expression.ValidateLambdaArgs(Type delegateType, Expression& body, ReadOnlyCollection1 parameters, String paramName) at System.Linq.Expressions.Expression.Lambda[TDelegate](Expression body, String name, Boolean tailCall, IEnumerable1 parameters)
at System.Linq.Expressions.Expression.Lambda[TDelegate](Expression body, Boolean tailCall, IEnumerable1 parameters) at System.Linq.Expressions.Expression.Lambda[TDelegate](Expression body, ParameterExpression[] parameters) at RazorEngine.Templating.TypeLoader.GetConstructorInternal(Type type) at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory) at RazorEngine.Templating.TypeLoader.GetConstructor(Type type) at RazorEngine.Templating.TypeLoader.CreateInstance(Type type) at RazorEngine.Templating.DefaultActivator.CreateInstance(InstanceContext context) at RazorEngine.Templating.RazorEngineCore.CreateTemplate(ICompiledTemplate template, Object model, DynamicViewBag viewbag) at RazorEngine.Templating.RazorEngineCore.<RunTemplate>d__12.MoveNext() at RazorEngine.Templating.RazorEngineService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.DynamicWrapperService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, String name, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action1 withWriter)
at RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag)
at AventStack.ExtentReports.Reporter.ExtentHtmlReporter.Flush(ReportAggregates reportAggregates)
at AventStack.ExtentReports.Core.ReportObservable.<>c__DisplayClass59_0.b__0(IExtentReporter x)
at System.Collections.Generic.List1.ForEach(Action1 action)
at AventStack.ExtentReports.Core.ReportObservable.NotifyReporters()
at AventStack.ExtentReports.Core.ReportObservable.Flush()
at AventStack.ExtentReports.ExtentReports.Flush()
at AirSoftAutomationFramework.Internals.DAL.Report.ReportsGenerationClass.AfterTest(IWebDriver driver) in C:\Users\Lior\Source\Repos\airsoftautomationframework\AirSoftAutomationFramework\Internals\DAL\Report\ReportsGenerationClass.cs:line 210

This exception was originally thrown at this call stack:
[External Code]
AirSoftAutomationFramework.Internals.DAL.Report.ReportsGenerationClass.AfterTest(OpenQA.Selenium.IWebDriver) in ReportsGenerationClass.cs

@DD0DGE
Copy link

DD0DGE commented Mar 1, 2023

Did you get a resolution for this? I am having the same issue with the Flush statement. I reverted NUnit3TestAdapter package back to 4.3.1 from 4.4.0 and the Flush started working again. I guess VS2022 and NUnit3TestAdapter version 4.4 don't play well together. Hope this gets fixed. Thanks!

@lior277
Copy link
Author

lior277 commented Mar 1, 2023

no, I am still waiting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants