Ehsan Ghanbari

Experience, DotNet, Solutions

Defining the Behavior Driven Development

You may have difficulties with writing a test first in your development process, it's also a little bit confused that you test something that does not exist! hum? lack of any specification within TDD of what should be tested and how. BDD is a methodology to overcome these 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 combines 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 for creating a code as a developer.


keep this at the forefront of your 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 another 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 a standard unit testing frameworks. 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:


About Me

Ehsan Ghanbari

Hi! my name is Ehsan. I'm a developer, passionate technologist, and fan of clean code. I'm interested in enterprise and large-scale applications architecture and design patterns and I'm spending a lot of my time on architecture subject. Since 2008, I've been as a developer for companies and organizations and I've been focusing on Microsoft ecosystem all the time. During the&nb Read More

Post Tags
Pending Blog Posts
Strategic design
Factory Pattern
time out pattern in ajax
Selectors in Jquery
Peridic pattern
How to query over Icollection<> of a type with linq
How to use PagedList In MVC
Domain driven design VS model driven architecture
What's the DDD-lite?
Using Generic type for type casting in F#