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

Re: [XP] Ancient testing wisdom

Expand Messages
  • David Chelimsky
    ... Very entertaining, and enlightening. The one thing I d add to this is that definition != dogma. I think defining a unit test within specific boundaries is
    Message 1 of 2 , Apr 28, 2007
    • 0 Attachment
      On 4/28/07, martijn_meijering <mmeijeri@...> wrote:
      > Funny words of wisdom on unit testing from one of the fine people at
      > Agitar:
      >
      > http://www.artima.com/weblogs/viewpost.jsp?thread=203994
      >
      > Small excerpt:
      >
      > The test is more important than the unit
      > The pupil asked the great master programmer Flying Feathers:
      >
      > "What makes a test a unit test?"
      >
      > This great master programmer answered:
      > "If it talks to the database, it is not a unit test.
      > If it communicates across the network, it is not a unit test.
      > If it touches the file system, it is not a unit test.
      > If it can't run at the same time as any other unit tests, it is not a
      > unit test.
      > If you have to do special things to your environment to run it, it is
      > not a unit test."
      >
      > Other master programmers, hearing this conversation, jumped in with
      > dissenting opinions and started to argue loudly.
      >
      > "Sorry I asked", said the pupil, and headed to his bedroom. On his
      > pillow he saw a note from the grand master programmer. The note said:
      >
      > "The answer from the great master Flying Feathers is an excellent guide.
      > If you follow it most of the time you will do well.
      > But don't get stuck on any dogma.
      > Write the test that needs to be written."
      >
      > The pupil slept well, while the other masters continued to argue long
      > into the night.

      Very entertaining, and enlightening.

      The one thing I'd add to this is that definition != dogma. I think
      defining a unit test within specific boundaries is fine. The dogma
      comes in not when you refuse to challenge the definition, but when you
      refuse to write other sorts of tests because you're using something
      called a "unit testing framework". It helps to know when a so-called
      "unit test" is not really a unit test - but that doesn't mean it
      shouldn't be written!

      Cheers,
      David
    Your message has been successfully submitted and would be delivered to recipients shortly.