Hello!
First of all, many thanks to JBehave developers for their work, I have
been using JBehave for 1 month and have been very enthusiastic about it
so far. Moreover it is both clearly documented and clearly coded!
The problem I recently encountered is when combining Examples and
GivenStories. Here are my two sample stories :
------------------------------------------------------------------------------
Story: test story 1
Scenario: test scenario 1
Given <something> I need to do to prepare this first story environment
When some <firstEvent> occurs
Then I can check a <firstOutcome>
Examples:
|something |firstEvent |firstOutcome |
|something1|firstEvent1|firstOutcome1|
|something2|firstEvent2|firstOutcome2|
------------------------------------------------------------------------------
Story: test story 2
Scenario: test scenario 2
GivenStories: org/ow2/petals/jbehave/spike/testStory1.story
When a <secondEvent> occurs
Then I can check a <secondOutcome>
Examples:
|something |firstEvent |firstOutcome |secondEvent |secondOutcome |
|something3|firstEvent3|firstOutcome3|secondEvent3|secondOutcome3|
|something4|firstEvent4|firstOutcome4|secondEvent4|secondOutcome4|
------------------------------------------------------------------------------
I want to be able to execute my 2 stories independently ie :
- when I run test story 1, it scenario 1 is run with examples included
in story 1
- when I run test story 2, both story 1 and story 2 are run with
examples included in story 1. Otherly said, what I want is "For an
execution of scenario 2 with example at ROW, I want as a scenario 1 of
story 1 to be run as a prerequisite with the *same* example ROW.
I cannot manage to obtain this behaviour...
After trying several configs of GivenStories, here is what I get :
***
GivenStories: org/ow2/petals/jbehave/spike/testStory1.story =>
all examples of story 1 are run as a prerequisite of story 2 => KO
***
GivenStories: org/ow2/petals/jbehave/spike/testStory1.story#{0},
org/ow2/petals/jbehave/spike/testStory1.story#{1} =>
all examples of story 1 are run as a prerequisite of story 2 => KO
Have I misunderstood some concept, or misused something ?
What would be the best way to implement this with JBehave, keeping in
mind that I would like to avoid copying and pasting steps across
stories.
Thanks
Marc
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email