Hi,
I was wondering if there was a way to perform the equivalent of
@BeforeStory and @AfterStory (from Jbehave) in cucumber-jvm. What I
would basically like is a way to have something run once before a
feature file and once when it is done. I tried to look into the the
hooks but they seem to work on a per scenario basis only.
I would also be interested in knowing if there is also a hook above
this e.g. it will run once regardless of the number of feature files
before anything is done and once after everything is complete.
Is there any particular reason you can't do this once for the entire
run in a static block?
Why do you need it per-feature?
Aslak
> --
> You received this message because you are subscribed to the Google Groups "Cukes" group.
> To post to this group, send email to cu...@googlegroups.com.
> To unsubscribe from this group, send email to cukes+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cukes?hl=en.
>
You could use static blocks to setup some global tools for your instrumentation. Then call these tools via tags for each scenario. Finally use memorisation and conditionals in the global tools to get the required initialisation, frequency.Hope that makes sense