문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top