Mauro Talevi wrote:
You can easily assign member variables to the Steps class to keep the state between steps. JBehave will simply run them in the order in which you've specified in the scenario. E.g.

Given a user with login Rickard
And a inbox
When the user logs in
Then the inbox is accessed

The first and second steps would create user and inbox object references (be they strings or other bespoke objects) and have them available as member variables for the other steps.

Hope that's clear, or I can provide a more detailed example in our examples codebase.

Right, so what I want to do then is to package the above into something which sets up my "assumed state", so I don't have to repeat it over and over again. Almost like, "Given a logged in account", where this entails creating the account, setting the settings, logging in and accessing the inbox. *Then* I want to create scenarios using that inbox. How do I do this kind of scenario composition best?

/Rickard


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

   http://xircles.codehaus.org/manage_email


Reply via email to