Ordering of stories or has given

55 views
Skip to first unread message

Laurent Kempé

unread,
Jun 10, 2011, 5:33:35 AM6/10/11
to Easyb Users, lauren...@techheadbrothers.com
Hi

Is it possible to order the execution of stories?
Or could we use a story or stories as a given of another one?

Cheers
Laurent

Dominique Jocal

unread,
Jun 10, 2011, 12:57:54 PM6/10/11
to easyb...@googlegroups.com, lauren...@techheadbrothers.com

A mean is to referer to those stories using the instruction "shared stories"
See http://code.google.com/p/easyb/wiki/SharedBehaviors espacially last comment

Cheers
D

Le 10 juin 2011 13:49, "Laurent Kempé" <lke...@gmail.com> a écrit :

Laurent Kempé

unread,
Jun 14, 2011, 10:11:02 PM6/14/11
to Easyb Users
Thanks for the answer!

But I have found that ordering of the execution of the different story
files would be also helpful. How would you do that?

Laurent

On Jun 10, 6:57 pm, Dominique Jocal <djo...@gmail.com> wrote:
> A mean is to referer to those stories using the instruction "shared stories"
> Seehttp://code.google.com/p/easyb/wiki/SharedBehaviorsespacially last

Richard Vowles

unread,
Jun 15, 2011, 1:41:28 AM6/15/11
to easyb...@googlegroups.com
In Ant, it is just the order in which they turn up. In Maven, I don't think there would be any reason for it. Why are you doing it by the way?

2011/6/15 Laurent Kempé <lke...@gmail.com>

Thanks for the answer!

But I have found that ordering of the execution of the different story
files would be also helpful. How would you do that?


--
---
Richard Vowles,
Grails, Groovy, Java
Consistency is the last refuge of the unimaginative - Oscar Wilde
ph: +64275467747, linkedin, skype:rvowles
get 2Gb shared disk space in the cloud - Dropbox, its incredibly useful! - http://tinyurl.com/cmcceh
podcast: http://www.illegalargument.com

Laurent Kempé

unread,
Jun 15, 2011, 3:58:12 AM6/15/11
to Easyb Users
I am using maven in a web application functional tests scenario. We
are writing stories in different story files using easyb which
leverage sahi web testing tool.

Currently the web application has an admin part which let the admin
create some data that the user can use on the public web site. Without
those data the user cannot do anything on the public website.
So the story of creating data is a prerequisite of the public user
stories.

This is why I'd like to order the story files execution, or use a
givenstory à la JBehave. btw I trie shared stories but I am still
investigating other possible alternatives.
Then we are running those stories using teamcity build and easyb maven
plugin against our integration stage which is deployed with an empty
DB.

What would you recommend in this case ?

Laurent

Richard Vowles

unread,
Jun 15, 2011, 7:25:35 AM6/15/11
to easyb...@googlegroups.com
The shared_stories was intended to solve this. By renaming your story files to .shared and then having an orchestration story that just includes them, you can control the order in which they are executed. 

The thing to understand is that you can block each set of stories inside a where clause with its own before/after, so you don't get clashing before/after implementations, so you can have

story-admin.shared:
where "admin stories", {}, {
  before "some init section", {
     given/when/then
  }
  after ....
   then each of your stories - and in  this case you can use the shared_stories to include them again in one file
}

story-user.shared:
where "user stories", {}, {
  before "some init section", {
     given/when/then
  }
  after ....
   then each of your stories - and in  this case you can use the shared_stories to include them again in one file
}

main.story

shared_stories "story-admin.shared"
shared_stories "story-user.shared"

Thats the *intention* of it. 

2011/6/15 Laurent Kempé <lke...@gmail.com>
--
You received this message because you are subscribed to the Google Groups "Easyb Users" group.
To post to this group, send email to easyb...@googlegroups.com.
To unsubscribe from this group, send email to easyb-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/easyb-users?hl=en.




--
---
Richard Vowles,
Grails, Groovy, Java
Consistency is the last refuge of the unimaginative - Oscar Wilde
ph: +64275467747, linkedin, skype:rvowles

Iakiv Kramarenko

unread,
Oct 23, 2013, 1:22:50 AM10/23/13
to easyb...@googlegroups.com, richard...@gmail.com
Hi Richard,

In this case You will get a 'before' behavior being executed each time... But what if you want some 'shared' story being executed only once? When you need just to ensure that Story_1 was executed before Story_2, Story_3, Story_4, and executing it before each story will be 'a waste of CI time'... 
I know this may mean 'dependent' tests, but so far this is the way we have them... 

And one more point... Does all this 'shared' stuff works for specifications (it "", {}) too?

Thanks,
Yakiv

Середа, 15 червня 2011 р. 14:25:35 UTC+3 користувач Richard Vowles написав:

Richard Vowles

unread,
Oct 23, 2013, 2:52:19 AM10/23/13
to easyb...@googlegroups.com
From memory, there is a before, and a before_each in a story.

Also from memory - this is two years ago - specifications are not supported.


To unsubscribe from this group and stop receiving emails from it, send an email to easyb-users...@googlegroups.com.

To post to this group, send email to easyb...@googlegroups.com.



--
---
Richard Vowles,
Groovy, Java, Javascript, AngularJS
Reply all
Reply to author
Forward
0 new messages