Peter, feature's been implemented and a 2.5-SNAPSHOT deployed.
The trader example has been updated to have a BeforeAndAfterSteps to address the setup/teardown concerns (currently just printing a message to System.out). Are you able to try out the feature using the snapshot? Cheers On 07/02/2010 10:07, Mauro Talevi wrote: > Hi Peter > > I've created a new issue to track this new feature: > > http://jira.codehaus.org/browse/JBEHAVE-239 > > As a workaround until it is implemented, you could implement a decorator > for ScenarioReporter which reports the before and after story events. > This is not ideal as you would not have access to the same > resources/dependencies that are available to the Steps classes. > > Another way to set up things for scenarios is to use the GivenScenarios, > which allows you to capture in a scenario steps that are reused elsewhere. > > Cheers > > On 07/02/2010 03:51, Peter wrote: >> Hi, >> >> I was actually trying to avoid using @BeforeScenario because I didn't >> want that to occur per-scenario (unless there's a way to do that and >> I'm being dense). Instead of execution being >> >> before >> scenario1 >> after >> before >> scenario2 >> after >> >> I wanted >> >> before >> scenario1 >> scenario2 >> ... >> after >> >> mainly for performance reasons - the before/after I need to do would >> end up being a significant portion of execution time. >> >> Thanks, >> Peter >> >> On Saturday, February 6, 2010, James Carr <[email protected]> wrote: >>> Hi Peter! >>> >>> For number 1, maybe @BeforeScenario and @AfterScenario would be helpful? >>> >>> http://jbehave.org/reference/latest/annotations.html#highlighter_44132 >>> >>> Thanks, >>> James >>> >>> On Sat, Feb 6, 2010 at 8:10 PM, Peter P <[email protected]> wrote: >>>> Hello, >>>> I had a couple of feature requests. >>>> (1) Some kind of "before" and "after" mechanism for a scenario file, e.g. >>>> something like the "Background" feature in Cucumber. >>>> (2) Ability to use a table example for #1. >>>> The use case I have is that I want to run a set of scenarios using a table >>>> of users that should be logged into the site when the scenarios run. I >>>> want >>>> to avoid logging in and out in after each individual scenario. >>>> >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> > > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
