Hi there, I'm currently working with JBehave and we implemented a Context object where we store data that we need to share between different steps.
Now, we are considering some improvements on this, like explicitly passing this data to the methods that implement these steps. Imagine you have a first step which will create a user and store its credentials into the Context. These credentials are needed in the second step. We would like to have some kind of annotation that allowed us to implement our step like this: @When("...some step definition which includes some $parameterFromStep") public void someMethod(String parameterFromStep, @FromContext( "userCredentials") String userCredentials) { ... } We tried to implement some logic that would take the parameter from the Context and pass it to the method. The problem with this is that JBehave doesn't find a method matching this step, as the method has the wrong number of parameters (it expects 1 but the method has 2). So my question is: Is there any way of doing this with the current implementation? Is there any way to force JBehave, for example, ignore the parameters that are annotated? I would really appreciate some guidance on this. Let me know if something is something needs extra clarifications, please. Thank you guys. -- You received this message because you are subscribed to the Google Groups "JBehave User" group. To unsubscribe from this group and stop receiving emails from it, send an email to jbehave-user+unsubscr...@googlegroups.com. To post to this group, send an email to jbehave-user@googlegroups.com. To view this discussion on the web, visit https://groups.google.com/d/msgid/jbehave-user/0fae230a-b5f6-4dc8-95ff-d3f4bb500ad1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.