maandag 7 oktober 2013

Seminar Behavior Driven Development (BDD)

Last thursday I went to a seminar about BDD. It was hosted by Tricode.

We started the evening with food (always good). After our bellies were filled, our brains were fed. We started with writing down our learning goals for that evening on sticky notes and made groups of four. After that we had to choose a product owner and a business analyst in our group and we received a description of a game. We had the description of a poker variant called 'willow'. After reading the description we had to give the descriptions back, and the product owner and business analyst switched groups. Now, with the new product owner and business analyst, we had to create user stories. Early in the discussion we discovered that the business analyst and product owner in our group had a different game description, namely 'Lamarckian Poker' (for a description of both games check the site of cheapass games). When we had this figured out, we let the product owner decide what the game should actually do (whether it was according to the description or not). For this we had seven minutes, and it was the first of multiple short sessions we had. Next we had a seven-minute-session for writing scenarios from the user stories and start an actual demo. The scenarios had to be written in the format Given-When-Then. After writing some scenarios we got ourselves a deck of cards an started the demo, trying out different cases for each scenario. We figured out that this would give us quick feedback about whether the scenarios were written correctly and if something was missing, we immediately changed the scenario to make it more complete. We also used the Then from the previous scenario as the Given for the next scenario, which made it more logical what the order of the scenarios should be. After that we had a couple more rounds of the same type of sessions. Between the sessions we got some information about BDD, and at the end it was time for testing the scenarios by players from other teams. Unfortunately our game wasn't tested due to the time.

At the end we would get our sticky notes with goals back and give answers to our questions.

We ended the evening with a quiz (I ended third) and drinks.



http://webmail.dalton-vatel.nl/wordpress-daltoncontact/wp-content/uploads/2012/07/petje-op-petje-af-300x237.jpg
http://webmail.dalton-vatel.nl/wordpress-daltoncontact/wp-content/uploads/2012/07/petje-op-petje-af-300x237.jpg

** update:
One of the questions I got is:

"What is the difference between TDD and BDD?"

To start with, BDD is based on TDD. Next to that BDD is focussed on behavior, functional behavior that is. When you look at the format for the scenarios (given-when-then), it's the same as a lot of functional testing tools use (e.g. Cucumber, JBehave, RSpec). BDD also focusses on creating common ground between the product owner, business analyst, and so on and the development team. A product owner for example, might not be familiar with the development process and that shouldn't matter. In BDD the behavior is described in 'natural language', which makes it understandable for everybody, and creates a common language.

This might be an interesting read about history of BDD and comparison of different BDD tools.
http://blog.jonasbandi.net/2010/03/classifying-bdd-tools-unit-test-driven.html