Defining the Behavior Driven Development

You may had difficulties about writing test first in your development process, it's also a little bit confused that you test something that's not exist! hum? lack of any specification within TDD of what should be tested and how. BDD is a methodology to overcome this difficulties. Behavior-driven development is an agile software development technique that encourages collaboration between developers. it's an evolution of TDD merged with DDD! It focuses on obtaining a clear understanding of desired software and business processes behavior focuses on business interests and technical insight. Behavior is how the user wants the application to behave. When your development is Behavior-driven, you always start with the piece of functionality that’s most important to your user.

 

If you are familiar with domain driven design, you may think about ubiquitous language, yes it is the same! In fact domain experts and product owner combine the native language and ubiquitous language to describe this behavior.  In BDD you write the tests understandable for non-developers. The benefit of writing this kind of test is that, you can understand the reason of creating a code as a developer.

 

keep this at the forefront of you mind that BDD is not only writing test in a native language. it is rather a paradigm than a process. It describes the cycle of writing a test first. You focus on behavior rather than just testing it. In other word, TDD focuses on the developer's opinion on how parts of the software should work but BDD focuses on the user's opinion on how they want your application to behave. BDD is intended to meet the needs of both business and technical users by mixing in aspects of DDD with core TDD concepts. BDD can be performed using standard unit testing frame- works. Nothing in BDD changes the mechanics of TDD and Everything that you do with TDD is still done in BDD approach but BDD covers more than TDD, although TDD is the core of BDD. 

 

 

for more information about BDD you can read these resources:

  1. http://en.wikipedia.org/wiki/Behavior-driven_development
  2. http://msdn.microsoft.com/en-us/magazine/gg490346.aspx
  3. http://pythonhosted.org/behave/philosophy.html


Tags: BDD


comments powered by Disqus