extent-framework/extentreports-csharp

Object reference exception in RazorEngine when running scenarios in Scenario Outline - Extent Reports 5.0.1

Closed this issue · 1 comments

I've noticed that in Extent Reports 5.0.1, if you run scenarios that use Scenario Outline Examples, the report fails to generate when .Flush() is called. The exception doesn't throw when you run tests normally, just in debug, but the report does not generate. When I run this in debug, it seems to be throwing an exception in the TemplateBase.cs class of the RazorEngine.Templating namespace. This doesn't happen when you run a test that is not contained with an Example. I've attached an image of the exception below. If anything else is needed please let me know!

OS: Windows 10
.NET Framework: .NET 6.0

image

@ben-morris2 I tried to repro and do observe an issue here, although I wasn't able to exactly see the issue you've referenced here. I'm adding a fix, hopefully that resolves what you're experiencing as well, but if it doesn't, an example or code snippet would really help.