Thanks Mauro, I was thinking about this some more and think maybe all I need to do is some refactoring. I have examples for each scenario, I can refactor these to an external file. I have just the steps for the general case scenarios in a stories file. Then I can create another story file using the general case scenarios as 'GivenStories' for the development environment scenarios and add the extra Then assertion steps. Using the @skip meta info I can include or exclude these scenarios depending on the environment. Haven't tried this yet but I think it might work. Comments?
Tricia On Wed, Feb 13, 2013 at 3:35 AM, Mauro Talevi <[email protected]>wrote: > The short answer is no. > > The longer one is that you can code yourself to ignore some steps based on > some env variable, which you can set as meta info or otherwise. > > If you want to just ignore failure you can configure JBehave to do that, > but steps after a failed one will not be performed. Execution will pick up > at next scenario. > > But you should not think of a step as equivalent to a JUnit test. If > anything it's the scenario which is closer to the mark. > > Cheers > > On 13 Feb 2013, at 00:55, P Williams <[email protected]> > wrote: > > > Hi All, > > > > I have a case where I want certain steps to be run only if I'm in my > development environment where the data is a known quantity. If the data is > a known quantity then I can assert things like: Then the first result is X. > If I'm running tests for the purpose of debugging against a production > like environment where the data is unknown I would assert things like: Then > there is at least one result. > > > > I can see there is an @ignore Meta Info attribute, but this applies to > whole Scenarios or Stories rather than a single Step. In Junit proper > there is an Assume.assumeTrue() method which will ignore tests with failing > assumptions but this hasn't worked with JBehave for me. I suppose I could > duplicate the story file and change the Then conditions but that doesn't > seem very elegant. Any ideas? > > > > Thanks, > > Tricia > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > >
