Loading ...
Sorry, an error occurred while loading the content.
 

RE: [XP] A new attempt to decide TDD vs BDD

Expand Messages
  • Kent Beck
    ... As the co-author of JUnit I would have to disagree. JUnit was written test-first from the beginning. It was always intended for test-first programming. It
    Message 1 of 60 , Oct 5, 2005
      > Ravi, if you're already in the TDD camp, then you're in the
      > BDD camp. BDD is the natural
      > evolution of TDD. We're simply fixing the framework to match
      > practice, rather than
      > botching practice to match the framework. We have outgrown
      > xUnit, it's time for
      > frameworks that fit. xUnit was written as a testing
      > framework, to test code that was
      > already written.

      As the co-author of JUnit I would have to disagree. JUnit was written
      test-first from the beginning. It was always intended for test-first
      programming. It was not intended to be a tool for after-the-fact testing,
      though I don't mind if people do use it to test after.


      With TDD we're not testing first, we're
      > specifying the expected behaviour.

      When I write a test that fails, I think I am testing first. Writing a test
      that doesn't work does help specify what I want the code to do (the intended
      effects of the code), but not the the code itself (the structure of the
      code). But, first I am writing a test that checks the current behavior of
      the system.
      >
      > If you're not specifying behaviour when you practice what you
      > call TDD, then you're doing
      > it wrong.

      Are you saying I'm doing it wrong?

      > So, stop thinking of TDD and BDD as conflicting ideals. BDD
      > is the natural evolution of
      > TDD.

      What evolved?

      xUnit frameworks were written when we were still
      > testing software after the fact.

      Some yes, some no.

      > Now we're (not testing first) specifying the behaviour of our
      > software. It's what the smart
      > folks have been calling TDD all along. We're just correcting
      > the vocabulary and the
      > framework to match the practice.

      If the code is the same, what is the difference?

      Kent Beck
      Three Rivers Consulting
    • Dakshinamurthy Karra
      Keith, I presume you replied to my mail and hence this followup. I am a by-stander to this whole debate till now and I agree with your sentiments. The original
      Message 60 of 60 , Oct 8, 2005
        Keith,

        I presume you replied to my mail and hence this followup. I am a
        by-stander to this whole debate till now and I agree with your
        sentiments. The original mail of mine originated out of frustation. I
        don't have anything against or for BDD. It is a new idea and as with
        any new ideas it is worth giving a try. Not withstanding the quote, I
        heard Dave/Liz/Michael saying that it is an thought experiment. To
        that extent, I even asked some of my collegues (who undertake our
        internal TDD training) to look at the paper and see whether it is
        useful in the context of fresher-training.

        Thanks and Regards
        KD

        On 10/8/05, Keith Braithwaite <Keith.Braithwaite@...> wrote:
        > Seems to me that no professional is entitled to refuse to listen to
        > other professionals reporting a claimed advancement in the art. But
        > also that professionals have a responsibility to report their claims
        > with a suitable degree of modesty (for want of a better word).
        --
        Dakshinamurthy Karra (http://xperiencingagility.blogspot.com)
      Your message has been successfully submitted and would be delivered to recipients shortly.