---------- Forwarded message ----------
From: Bhuvnesh Pratap <pratap...@gmail.com>
Date: Tue, Feb 21, 2012 at 4:41 PM
Subject: Seeking Help related to using Jbehave
To: dev@jbehave.codehaus.org


Hello,

First kudos to you guys for the awesome work you have been up to. I have
been using JBehave + Spring + Selenium
configuration while using the SeleniumConfigration provided by JBehave and
have been following the etsy spring
selenium example. There are couple of things I am struggling to get done
and that is why feel I it's be better to ask
you guys here


1) Looking at the code I noticed that all the @BeforeStory/Scenarios
annotations run for all the Story/Scenario
    present in the purview of JBehave, I mean there doesn't seem to be any
one to one corresponding between
    Story/Scenarios and @BeforeStory/Scenario annotations. Please correct
me if I am wrong, in case this actually
    is the expected behavior could you please help me how to attain the
one-two-one mapping of @BeforeStory/
    Scenarios for the stories and the scenarios.


* For your reference this is what i am doing :*
* For each text story there is a corresponding *Story.java which extends a
SuperStory.java which in return extends *
* JUnitStories. Moreover there exists a *Steps.java corresponding to each
text story as well. *Steps.java are injected*
* from a common spring bean inside the SuperStory.java.apart from this
there is single LifeCycleSteps extending *
* PerStoriesWebDriverSteps.*

* What I am looking to achieve :*
* I want to configure my @BeforeStory/@BeforeScenarios to configure in a
way such that  execution of story "x" *
* should execute only the  @BeforeStory/Scenarios of the Step "x"*



2) There is another thing i want to know about which is, is there a way to
maintain data across steps during the run
    of one particular scenario ? I mean maintaining  the state/data during
a scenario across the Given/When/Then.



Please excuse me if I haven't used the proper channel to put up these
queries. Looking forward to
your response.



Thanks,
Bhuvnesh Pratap Singh

Reply via email to