I see. So there is no use looking for a existing JBehave feature for this.

I meant dynamic variables which are set and used at runtime. There are
cases where one has to automate tests on non-deterministic test data (I
mean the data of the application under test).

A "life cycle" of these variables might be an issue in future. Currently I
cannot tell you a real world use case for it. But I think there might be
the need to configure the scope of such dynamic variables to be existing
per stories, per story or per scenario. This would require a close
integration into JBehave execution procedure.

The easiest could be to store the variables for the whole execution and to
clear them if needed in steps annotated with @BeforeStory for instance.

I have to think a bit on how I could solve this in a suitable and good way.


2013/10/31 Mauro Talevi <[email protected]>

> Typically you would define an API to access these variables.   This is
> something that you cannot really generalise.
>
> If on the other hand you know these variable at execution time, you could
> pass them as system properties in the jbehave maven goal or ant task.
>
>
> On 31 Oct 2013, at 11:12, Hans Schwäbli <[email protected]>
> wrote:
>
> > For some stories and scenarios I need dynamic variables which are
> determined at runtime.
> >
> > Example: I want to store the balance of an account, do some transactions
> and then expect that the balance is increased by 1000 for instance. If your
> test data are not deterministic you need such approaches.
> >
> > Is there a JBehave feature for this, storing such dynamic variables at
> runtime and accessing them at runtime across scenarios and stories?
> >
> > Or do I have to implement that myself in my steps?
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>

Reply via email to