This document discusses using behavior-driven development (BDD) to write unambiguous specifications for a FizzBuzz game. It provides a user story that is unclear, then refactors it using a BDD approach of scenarios for different behaviors. It argues BDD provides a single source of truth that specifies and tests functionality, allowing developers, product owners, and testers to work more efficiently.
3. As a game player I want to enter a number
and if the number entered can be divided by
three then it should return the word ¡®fizz¡¯ and
if the number can be divided by five then it
should return the word ¡®buzz¡¯ and if the
number can be divided by both three and
five then it should return the words ¡®fizz buzz¡¯
Good user story?
4. How long does it take you to distill all the
information to its valuable essence?
How many times do you have to manually
run and test the application?
How many times do you have to go back
and review the user story?
5. Fizz Buzz Story
As a player I want to enter a number to play the fizz buzz game
Fizz scenario
Given the number is divisible by Three
Then return ¡°Fizz¡±
Buzz scenario
Given the number is divisible by Five
Then return ¡°Buzz¡±
Fizz Buzz scenario
Given the number is divisible by Three and Five
Then return ¡°Fizz Buzz¡±
Common language and Structure matters!
8. Good Solution?
No one reads
comments!
No one updates a
comment!
None Devs,
POs etc, will
now ask you
about business
logic!
Lets all comment our
code!
13. Should I care as the Product Owner?
¡ñ Specify and build software that actually works
¡ñ Developers will actually read the specification
¡ñ They will understand the requirements quickly
¡ñ They will not skip parts of the specification
¡ñ I can track the development progress
¡ñ I save time on acceptance and smoke testing
14. Should I care as the Developer?
¡ñ Requirements will be unambiguous and without
functional gaps
¡ñ I will have automated tests to guide my development
¡ñ It will be easier to hand over or take over code
15. Should I care as the QA?
¡ñ I can stop developers from making the same mistake
over and over
¡ñ Avoid testing the same functionality over and over
¡ñ Build quality into the software from the start
¡ñ Verify business rules by a single click