This project is read-only.

error with table parsing

Feb 27, 2011 at 1:17 PM


i dont know what im doing wrong but it appears that i cant create a step for a table with 5 columns

heres what i try to do:


    public class Actions
        void attempt(string a,string b,string c,string d,string e)
and heres my feature file:
  work on Simple Dummy Project
	|dummyProject	|Class1	|method1	|1| lior|

and im getting the following exception in runtime:
  System.NullReferenceException : Object reference not set to an instance of anobject.   at System.Object.GetType()   at NBehave.Narrator.Framework.StringStepRunner.GetActionType(Object action)   at NBehave.Narrator.Framework.StringStepRunner.RunStep(ActionMethodInfo info, Func`1 getParametersForActionStepText)   at NBehave.Narrator.Framework.StringStepRunner.RunStep(ActionStepText actionStep, Func`1 getParametersForActionStepText)   at NBehave.Narrator.Framework.StringStepRunner.RunStep(ActionStepText actionStep, Row row)   at NBehave.Narrator.Framework.StringStepRunner.NBehave.Narrator.Framework.IStringStepRunner.Run(ActionStepText actionStep, Row row)


any idea why this dosent work?



Feb 27, 2011 at 7:40 PM

A null reference can only mean a bug, thanks for the reproduction steps, I'll try to reproduce it and see if I can get a fix out.

Feb 27, 2011 at 8:03 PM

While our runner should give better exception messages, the structure of your feature file is a little wrong. It should be in the following structure:


Scenario: <description>
Given <given text>
When <when text>
Then  <then text> 


I'm still taking a look at exactly why we are getting a null reference though.

Feb 27, 2011 at 8:43 PM

I know,

this is not a real feature file. just something simple to reproduce the problem.

let me know what you find.

Feb 28, 2011 at 8:41 PM
Edited Feb 28, 2011 at 8:45 PM

I’ve just committed a fix for this…

It can now support up to seven parameters, which still is not ideal. We should be able to add the ability to use any number of parameters in the next version.

If you need more parameters still just let us know and we’ll increase the limit.

You can pick up the latest zip/exe from here, sorry it took so long!

Please let me know how you get on.