Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

BDD versus TDD

 
Zhia-zhia Xiu Bai
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

A good resource for BDD.
 
Paul Duvall
author
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are your thoughts, if any, about BDD versus TDD?


I think Andy will be replying to this later, but for now, have a look at his blog article on the topic here: http://thediscoblog.com/2007/08/28/is-bdd-tdd-done-right/
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic