Hi,

if you want to share values between steps in different classes, you can inject your own context class - a simple pojo or some other API class - and autowire it using one of the DI containers that are supported, Spring, Guice, Pico etc ... If you declare this class as a singleton in the container (the default in most containers), it'll allow you share its values.

I hope that helps. If it doesn't feel free to share your use case and what you are trying to do via an example.

Cheers

On 23/12/2013 01:25, Bernardo Pinto wrote:
Hi,

I want to save the value of some variables from one step to the following ones. I found this thread on the subject: http://www.mail-archive.com/[email protected]/msg00719.html. What I wanted to know is if JBehave still does not have a mechanism to store the state of a Scenario (as, for example, Cucumber: https://relishapp.com/cucumber/cucumber-tck/docs/world-or-context). If this mechanism still does not exist, do you have any suggestion about how should I do this?

Thank you in advance,
Bernardo Oliveira Pinto


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to