So, if I understood you correctly you are basically saying that I should not
use the GivenStories functionality in this case and reuse the authentication
steps code but not the authentication story description (in other words, the
step description would be repeated in many different stories).

Have I understood it correctly?

I was wondering if it would make sense to pass parameters in the
GivenStories inclusion. What do you think?

On Tue, Sep 7, 2010 at 2:40 AM, Clemens Wyss <[email protected]> wrote:

> I would keep your authentication story (with its examples I guess?) as is
> and create a convenience Given-step à la:
>   Given I am authenticated as '<uid>' with password '<pw>'
> for request registration and request approval stories. Code reuse can be
> made in the step implementation of Given("I am authenticated as '<uid>' with
> password '<pw>'") from which you can call the method(s) of the
> authentication story. You could (possibly should) implement this convenience
> step in the AuthenticationSteps class and include it in the registration and
> request approval stories.
>
> Regards
> Clemens
>
> > ----- Ursprüngliche Nachricht -----
> > Von: Paulo Sérgio Medeiros
> > Gesendet: 06.09.10 22:01 Uhr
> > An: [email protected]
> > Betreff: [jbehave-user] Parametrizing stories
> >
> > Hi,
> >
> > I'm testing an workflow application where many stories are dependent on
> > others.
> >
> > Thus, there are many cases where two stories depend on the same story but
> > with different parameters.
> >
> > One very simple example is the stories that depend on the login story.
> The
> > following case illustrate the scenario:
> >
> > request_registration() -> authentication(user1,pass1)
> > request_approval() -> authentication(manager1,pass2)
> >
> > '->' represents the dependency relationship between stories and the
> > parenthesis represent the parameters passed from one story to another.
> > So, in the example above, the story request_registration depends on the
> > authentication story passing two parameters (a user and his password).
> Note
> > that the request_approval story also depends on the authentication story,
> > but with different parameters.
> >
> > Does any one have this same need? Does jbehave already implements
> something
> > that can be used to get this behavior?
> >
> > Thanks!
> > Paulo Sérgio.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

Reply via email to