extent reports not generating reports

1

I am using extentent reports to generate report but the test excution fails on extent.flush() method. I am using

  • extentreports 3.1.3
  • Specflow.xunit 2.2.1

This code use to work previously but not working anymore. Error returned :

System.IO.FileNotFoundException HResult=0x80070002 Message=Could not load file or assembly 'System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. Source=RazorEngine StackTrace: at RazorEngine.Compilation.CSharp.CSharpDirectCompilerService..ctor(Boolean strictMode, Func1 markupParserFactory) at RazorEngine.Compilation.DefaultCompilerServiceFactory.CreateCompilerService(Language language) at RazorEngine.Templating.RazorEngineCore.CreateTemplateType(ITemplateSource razorTemplate, Type modelType) at RazorEngine.Templating.RazorEngineCore.Compile(ITemplateKey key, Type modelType) at RazorEngine.Templating.RazorEngineService.CompileAndCacheInternal(ITemplateKey key, Type modelType) at RazorEngine.Templating.RazorEngineService.GetCompiledTemplate(ITemplateKey key, Type modelType, Boolean compileOnCacheMiss) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, 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 AventStack.ExtentReports.Reporter.ExtentHtmlReporter.Flush() at AventStack.ExtentReports.Model.Report.<>c.b__29_1(IExtentReporter x) at System.Collections.Generic.List1.ForEach(Action1 action) at AventStack.ExtentReports.Model.Report.NotifyReporters() at AventStack.ExtentReports.Model.Report.Flush() at AventStack.ExtentReports.ExtentReports.Flush() at XUnitTestProject5.UnitTest1.Test1() in C:\Users\kotar\source\repos\XUnitTestProject5\XUnitTestProject5\UnitTest1.cs:line 25

 var HTMLReporter = new ExtentHtmlReporter(@"C:\test\TestReport.html");
 HTMLReporter.Configuration().Theme = AventStack.ExtentReports.Reporter.Configuration.Theme.Dark;
 var extent = new ExtentReports();
 extent.AttachReporter(HTMLReporter);
 var featurename = extent.CreateTest<Feature>("login feature");
 var scenario= featurename.CreateNode<Scenario>("Login as a user ");
 scenario.CreateNode<Given>("user has access to the methos ");

 extent.Flush();
c#
specflow
extentreports
asked on Stack Overflow Mar 27, 2019 by Ravi • edited Mar 27, 2019 by fhnaseer

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0