I sometimes get the below error when running my tests with xunit.
System.NullReferenceException: Object reference not set to an instance of an object.
at TestStack.BDDfy.Reporters.FileReportSummaryModel.<>c.<.ctor>b__2_0(Story s)
at System.Linq.Enumerable.d162.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
at TestStack.BDDfy.Reporters.FileReportSummaryModel..ctor(ReportModel reportModel)
at TestStack.BDDfy.Reporters.FileReportModel..ctor(ReportModel reportModel)
at TestStack.BDDfy.Reporters.Html.HtmlReportModel..ctor(IHtmlReportConfiguration configuration, ReportModel reportModel)
at TestStack.BDDfy.Reporters.Html.HtmlReporter.WriteOutHtmlReport(ReportModel reportModel)
at TestStack.BDDfy.Reporters.Html.HtmlReporter.Process(IEnumerable`1 stories)
at TestStack.BDDfy.Engine.InvokeBatchProcessors()
at TestStack.BDDfy.Engine.<>c.<.cctor>b1_0(Object sender, EventArgs e)
I've included a sample project so that you can reproduce the error.
bddfy_error.zip
The xunit.console executable I'm using is in the XUnit folder.
Like I said, the error only happens sometimes. I've created a little script that runs the tests 100 times. For me, one of those times it throws the error. The script is run.ps1 at PCL.Tests/bin/Debug.
I sometimes get the below error when running my tests with xunit.
System.NullReferenceException: Object reference not set to an instance of an object. at TestStack.BDDfy.Reporters.FileReportSummaryModel.<>c.<.ctor>b__2_0(Story s) at System.Linq.Enumerable.d16
2.MoveNext() at System.Collections.Generic.List
1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable
1 source) at TestStack.BDDfy.Reporters.FileReportSummaryModel..ctor(ReportModel reportModel) at TestStack.BDDfy.Reporters.FileReportModel..ctor(ReportModel reportModel) at TestStack.BDDfy.Reporters.Html.HtmlReportModel..ctor(IHtmlReportConfiguration configuration, ReportModel reportModel) at TestStack.BDDfy.Reporters.Html.HtmlReporter.WriteOutHtmlReport(ReportModel reportModel) at TestStack.BDDfy.Reporters.Html.HtmlReporter.Process(IEnumerable`1 stories) at TestStack.BDDfy.Engine.InvokeBatchProcessors() at TestStack.BDDfy.Engine.<>c.<.cctor>b1_0(Object sender, EventArgs e)I've included a sample project so that you can reproduce the error. bddfy_error.zip
The xunit.console executable I'm using is in the XUnit folder.
Like I said, the error only happens sometimes. I've created a little script that runs the tests 100 times. For me, one of those times it throws the error. The script is run.ps1 at PCL.Tests/bin/Debug.