[rspec-users] cucumber feature description
ben at benmabey.com
Sat Oct 25 19:19:50 EDT 2008
Mark Thomson wrote:
> In the old Story Runner framework the feature description had a
> preamble that looked like
> As a...
> I want...
> So that...
> When I was moving to cucumber I seem to remember reading somewhere
> that that formulation was being changed, and indeed the example here -
> looks like this -
> In order to...
> As a...
> I want to...
> However I can't find specific documentation that spells that out. The
> discussion about migrating from stories here -
> doesn't say anything about it and I've also written features
> successfully using the original formulation.
> So I'm just curious about what the significance of the preamble is. Is
> it purely an aid to help the writer think correctly about what they
> are supposed to be describing? Does it make any real difference how it
> is formulated or whether it's even present?
The preamble or narrative doest not effect the actual running of the
feature but like you said, it acts as an aid to answer upfront the most
important question about this feature - why am I implementing it? Or in
other words, what is the business value that this feature will fulfill?
Along with the business value being listed having the role in the
narrative is also very helpful as it places the all of the scenarios in
the right context.
A more qualified person may want to answer your question, but my short
explanation of the change of the default narrative layout is to state
the business value at the start instead of the end. However, you
shouldn't feel constrained to use that layout all the time though.
Whatever communicates the business value best and most succinctly to the
customer and you for a given feature is what you should use.
More information about the rspec-users