Thanks for the fast answer Brian! It is odd - EXAMPLE seems to only work for examples, and NORMAL for non-examples, whereas the sensible thing in my opinion is to have EXAMPLE be a superset of NORMAL. As it is, we have to have both annotations on separate methods which call a common method to do the work. Workable but clunky.
Bill Brian Repko <[email protected]> wrote: > > Bill, > > Look at the javadoc for @Before/AfterScenario - there are attributes on the > annotation > for scenario type - EXAMPLE and NORMAL. The defaults are setup to be backward > compatible. > > B > > ----- Original message ----- > From: "Bill Ross" <[email protected]> > To: [email protected] > Date: Fri, 16 Mar 2012 10:37:41 -0700 > Subject: [jbehave-user] @AfterScenario should execute for parameterized > scenarios > > We just discovered that @AfterScenario does not execute for each > iteration of a parameterized scenario. Is there any reason for this? > It seems like a bug - there should be a hook that lets one clean > up after (or before for @BeforeScenario) each iteration of a > parameterized scenario. In my case, I want to print out the ids of > the user and transaction created for each iteration, in addition > to cleaning these up in our context class so they don't pollute > the next test. It doesn't seem right to have an explicit cleanup step > only used for parameterized scenarios. > > Does anyone depend on having @AfterScenario and @BeforeScenario only > execute after/before all the scenarios in a param scenario run? > > Bill > > --------------------------------------------------------------------- > 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
