I am trying to run jbehave stories in a sequence.
My package structure for Integration tests is shown below
src/it/some/package/name/packageA/a.story
src/it/some/package/name/packageB/b.story
src/it/some/package/name/c.story
I want the story to be run in this sequence a.story, b.story, c.story
I tried using GivenStories in jBehave but they didn’t seem to work (may be I am not specifying them correctly). I would very much appreciate it if someone could point to the creation of GivenStories text and also show some insight as to how jbehave creates the ordering when it runs the Integration tests because I see that running stories on my machine and on jenkins seems to be yielding different execution ordering.
Any help on this is greatly appreciated. Thanks!
I actually figured out a work around on this issue which i thought was much convenient than GivenStories
First i added a maven surefire configuration like this
The SampleTesterSequence would be structured like the one shown below
As you can see the the suite will run the stories a,b,c in the sequence i mention with the suite, when surefire runs the tests it looks for a pattern ending with
TesterSequenceand will run that class first and from that class it executes the stories we want to run in that order specified.