views:

30

answers:

1

Ok so I'm just starting to try and use BDD for some new development we are doing and I wrote up a story like this for a log viewer feature:

Story: User reviews workflow execution logs

As a user
I want to review the log of rules execution
So that I can examine the results and make adjustments/fixes to the rules definitions

with some scenarios that goes with it, something like given the user has proper security privileges to the log viewer when he clicks on view log then he is granted access to the log viewer

Now I know we need a way to sort and filter the log. Is this meant to be a whole other story, like this ?

Story: User filters the execution logs

As a user
I want to filter the log entries by selecting categories
so that I can view only log entries matching the category I selected

Or are some more 'simpler' feature belongs in a scenario of the first story ? like this...

Scenario 2:

Given the user is looking at the log entries
When a category is selected
Then only the log entries matching the categories are displayed

I understand this might be hard to answer as there is probably not one right way to do this, but I still am a little confused on how these kind of things should be split.

A: 

The "As a... I want... So that..." we normally refer to as the Narrative of the story. Please take a look at Feature Injection's template: "In order to... As a... I want" - putting the goal first has some interesting effects!

There's often more than one scenario associated with the story. A scenario is an example of how a user of a system might want to use it. The scenarios are there to enable us to have conversations with our stakeholders:

"So, given I only have $20 in my account, when I ask for $50 then it should tell me I don't have enough money?"

"Yes, unless you have an overdraft."

When we write them with BDD tools or a testing framework, we get acceptance tests as a wonderful by-product of these conversations!

You can find more information about BDD here:

http://en.wikipedia.org/wiki/Behavior_driven_development

and here:

http://www.infoq.com/articles/pulling-power

Transparency: I wrote most of the first and am the author of the second, so anything which isn't clear is my fault.

Lunivore
I haven't read the whole pulling power article as it's quite long but it looks very nice. However, I am still a little bit confused, but I feel like the scenarios are really more of a QA thing and the story is really a feature thing, so in fact both the story AND the scenario I mentioned in my question can co-exists if the scenario is oriented more in a way to validate the actual feature.
SBUJOLD
The scenarios are equivalent to acceptance tests, and are there so that QAs, BAs and devs can all have a good understanding of the story. Yes, both commonly co-exist in my projects. The story is represented by a card on the visual wall and has several scenarios associated with it.
Lunivore