-
Notifications
You must be signed in to change notification settings - Fork 163
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
The presence of a background causes a crash when integrating test results #238
Comments
Hi, I'm sorry you ran into troubles. Thank you for taking the time to report this. Would it be possible for you to attach the feature file and nUnit test results file in question? Thanks! |
I'm starting on this now. |
I am sorry, I am unable to reproduce the issue on my machine. It would really help if you could attach the feature files and the test result file. Thank you. |
The problem seems to occur with results produced using NUnit console version 2.6.4 (I can't use NUnit v3 as SpecFlow doesn't seem to support it). I've recreated the problem using the simple feature file which I've attached. ) The problem seems to be in the following section of code in the Mapper.cs file:
featureElement.Background.Feature property isn't set here which subsequently causes a NullReferenceException in the NUnitSingleResults.cs file, line 101. |
Thanks for the files, I can reproduce the issue now. And thanks for the analysis too! |
I released the fix in version 2.0.3 |
Yep, v2.0.3 has fixed the problem. Thanks for the quick turnaround. |
You're welcome- glad I could help! |
I have a Feature file with 3 scenarios and 2 Background steps. The presence of the Background steps causes Pickles.CommandLine to throw a NullReference Exception in the NUnitSingleResults class because the feature.Background.Feature property is not set for Backgrounds. Here is the full stack trace:
ERROR|Runner|Something went wrong during generation: System.NullReferenceException: Object reference not set to an instance of an object.
at PicklesDoc.Pickles.TestFrameworks.NUnitSingleResults.<>c__DisplayClass11_0.b__1(XElement x) in C:\Dev\Code\GitHub\PicklesDoc\pickles\src\Pickles\Pickles\TestFrameworks\NUnitSingleResults.cs:line 101
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable
1 source, Func
2 predicate)at PicklesDoc.Pickles.TestFrameworks.NUnitSingleResults.GetScenarioResult(Scenario scenario) in C:\Dev\Code\GitHub\PicklesDoc\pickles\src\Pickles\Pickles\TestFrameworks\NUnitSingleResults.cs:line 63
at System.Linq.Enumerable.WhereSelectArrayIterator
2.MoveNext() at System.Linq.Buffer
1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable
1 source)at PicklesDoc.Pickles.TestFrameworks.MultipleTestResults.GetScenarioResult(Scenario scenario) in C:\Dev\Code\GitHub\PicklesDoc\pickles\src\Pickles\Pickles\TestFrameworks\MultipleTestResults.cs:line 99
at PicklesDoc.Pickles.DocumentationBuilders.HTML.HtmlScenarioFormatter.Format(Scenario scenario, Int32 id) in C:\Dev\Code\GitHub\PicklesDoc\pickles\src\Pickles\Pickles\DocumentationBuilders\HTML\HtmlScenarioFormatter.cs:line 65
at PicklesDoc.Pickles.DocumentationBuilders.HTML.HtmlFeatureFormatter.Format(Feature feature) in C:\Dev\Code\GitHub\PicklesDoc\pickles\src\Pickles\Pickles\DocumentationBuilders\HTML\HtmlFeatureFormatter.cs:line 75
at PicklesDoc.Pickles.DocumentationBuilders.HTML.HtmlDocumentFormatter.Format(INode featureNode, GeneralTree
1 features, DirectoryInfoBase rootFolder) in C:\Dev\Code\GitHub\PicklesDoc\pickles\src\Pickles\Pickles\DocumentationBuilders\HTML\HtmlDocumentFormatter.cs:line 74 at PicklesDoc.Pickles.DocumentationBuilders.HTML.HtmlDocumentationBuilder.WriteContentNode(GeneralTree
1 features, INode node, String htmlFilePath) in C:\Dev\Code\GitHub\PicklesDoc\pickles\src\Pickles\Pickles\DocumentationBuilders\HTML\HtmlDocumentationBuilder.cs:line 104at NGenerics.Patterns.Visitor.VisitorExtensions.AcceptVisitor[T](IEnumerable
1 enumerable, IVisitor
1 visitor)at PicklesDoc.Pickles.Runner.Run(IContainer container) in C:\Dev\Code\GitHub\PicklesDoc\pickles\src\Pickles\Pickles\Runner.cs:line 61
The text was updated successfully, but these errors were encountered: