Behaviour driven development is now widely accepted process in Agile community. Now the question to be asked what is that make this simple discipline powerful and effective? And how to use the power of communication?
Agile development practices have been preaching for years on the aspect of writing acceptance tests for the requirements upfront. These acceptance tests used to be written in various and tools. Fitnesse definitely levraged among all other tools, simply because it enabled developement teams to use power of communication. No longer there was divide between tests being too technical for the people to read who actually cared about them, ofcourse I am talking about business , BAs, Testers.
Behaviour Driven Development is refined form for writing Acceptance tests, where requirements are expressed in natural language of communication (English, French etc) and implemented in the same form. This enabled no loss of communication from Requirements to Tests. And also it forces business to be involved with requirement throughout, as they have visibility on what they asked WORKS !
Tools like Cucumber, Concordian, Jbehave, Easyb enabled a uniform language of communication for Requirements and Tests , which looks like a simple discipline but it is very powerful.
Not only business gets lot of value from it at the same time development teams are equally benefited, as they have clear understanding of expected software behaviour in the form of executable requirement. Also, the power of BDD lies in thinking about business problem and expressing the intent without thinking about the implementation details of the problem.
A BDD can express the intent in form of Simple Sentences, Tables, Examples etc. The most common form of Acceptance testing format is Given – When – Then, which is widely being used in BDDs.
Given – Is a prerequisite or precondition for an action.
When – A action or Event happens.
Then – Results of the action.
Example – Saving bank account withdraw scenario
Given there are 1000$ in saving bank account number XXXXXXX
When a cash with drawl of $900 is done
Then available balance is $100
The above example is a simple explanation of How a Given When Then can express an intent in consistent and effective way.
