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

Crash when a feature is not present in the test result (with NUnit) #85

Closed
freeman opened this issue Dec 13, 2013 · 1 comment
Closed
Milestone

Comments

@freeman
Copy link

freeman commented Dec 13, 2013

Some of our feature are ignored from our test run.

Pickles crashes with this error :

Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object.
   at PicklesDoc.Pickles.TestFrameworks.NUnitResults.GetFeatureResult(Feature fe
ature)
   at PicklesDoc.Pickles.Runner.<>c__DisplayClass1.<ApplyTestResultsToFeatures>b
__0(INode node)
   at NGenerics.Patterns.Visitor.ActionVisitor`1.Visit(T obj)
   at NGenerics.Patterns.Visitor.VisitorExtensions.AcceptVisitor[T](IEnumerable`
1 enumerable, IVisitor`1 visitor)
   at PicklesDoc.Pickles.Runner.ApplyTestResultsToFeatures(IContainer container,
 Configuration configuration, GeneralTree`1 features)
   at PicklesDoc.Pickles.Runner.Run(IContainer container)
   at PicklesDoc.Pickles.CommandLine.Program.Main(String[] args)

in this case.

It seems to be caused because the GetFeatureResult method does not checks for a null return from GetFeatureElement.

I can submit a pull request if you like.

@dirkrombauts
Copy link
Member

Thanks - I would be very grateful for a pull request!

freeman added a commit to freeman/pickles that referenced this issue Dec 17, 2013
freeman added a commit to freeman/pickles that referenced this issue Dec 19, 2013
freeman added a commit to freeman/pickles that referenced this issue Dec 19, 2013
dirkrombauts added a commit that referenced this issue Dec 20, 2013
Fix issue #85 : NullReferenceException when some NUnit tests were skipped
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

2 participants