This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi I have worked on a team that uses TDD(test driven development) and XP(extreme programming) with continuous integration of code just as outlined by Martin Fowler.(cvs, CruiseControl, daily commits, Junit, automated build scripts). I am looking to broaden my skills as a developer and have started to teach myself Ruby(on Rails as well) and BDD(behavioral driven development). What are your thoughts, if any, about BDD versus TDD? thanks zhia-zhia
I don't believe we have a "Versus" kind of thing between BDD and TDD. We can use both, why not? BDD is a common sense approach. I have been following it since long without even knowing this word, 'BBD'. On the contrary, I consider TDD as an idea, which was not there - or better say not common and still not common. It is kind of approach not everybody was familiar with. You can say BDD emphasize on one point - as it names suggest - and TDD on the other. But it doesn't mean that there is no tests and no behavioral approach in BDD and TDD, respectively. Its just the name. May be few folks misunderstood the term BDD, as we can know from wikipedia's definition of the term BDD. In fact BDD is kind of integration between TDD and DDD.
Co-author of <a href="http://www.amazon.com/gp/product/0321336380/" target="_blank" rel="nofollow">Continuous Integration: Improving Software Quality and Reducing Risk </a> <br />(Addison-Wesley Martin Fowler Signature Series, 2007). Companion website for the book is <a href="http://www.integratebutton.com/" target="_blank" rel="nofollow">IntegrateButton.com</a>
I also don't see any "versus" between TDD and BDD.
What I very much like about BDD is the focus on, well, describing behavior. I simply like tests that read very much like a natural description of the expected behavior of a class.
What I'm not convinced of is the focus on using mocks that seems to be connected to BDD. It is my experience that often state based testing seems to be simpler and more stable than interaction based testing.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus