I had the same problem with this: @When("I enter '$value' into the form field '$controlName'")
when my method turns out to be private instead of public.
I can see that there's reasoning behind why failing steps say pending. It's so that people can "write steps before they are implemented".
Meanwhile, out here in the real world people don't actually want a build that passes successfully before the test methods are implemented. That's not helping anyone. No one does that. That would actually just be crazy.
What people actually do out here in the real world is mistype the text of the step or (in my case) put a step annotation in front of what turns out to be a private method. Or any other of a litany of minor development errors that might cause a step not to match a function. Then spend HOURS trying to why the F*#K jbehave isn't working.
When this happens, jbehave's approach is to fail silently, and if the developer should scroll through their voluminous log output then they might find that says a step is "pending". Insofar as jbehave is little more than a library to parse some text and call some functions from said text, do you not think it might be useful to THROW ERROR MESSAGES WHEN ERRORS OCCUR?!
And then perhaps we can all get back to doing our actual work. I've had work mates try to explain to me that "no no you don't understand, that's the way it's supposed to work; it says pending when it means failed." We also have this FailingUponPendingStep thing. It means the tests fail but it doesn't mean that it tells me I don't have a method for my function.
You can probably tell that this is annoying me slightly. JBehave is a TOOL. To do a VERY SIMPLE JOB. It has to parse some frickin text and call some frickin functions from it. It's not rocket surgery. When there's an error, throw an error and exit. You will make everyone else's lives much less of a misery if you just write software that does one single job in an orderly and predictable fashion.
I say it again NOTHING IS WORSE THAN SILENT FAILURE in a software library. I would recommend that you a) fix this particular one and b) don't embed the concept of silent failure into the very business logic of your software.
Hi David, could you please provide some code that reproduce the problem?
thanks