Skip to content
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

Error thrown when running tests with Xunit in parallel #259

Open
braingame26 opened this issue Sep 19, 2017 · 0 comments
Open

Error thrown when running tests with Xunit in parallel #259

braingame26 opened this issue Sep 19, 2017 · 0 comments

Comments

@braingame26
Copy link

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.d__162.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>b__1_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.

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

1 participant