DIPL.-ING. MARTIN WEITZEL, 64380 ROSSDORF, GERMANY

Testing First (TDD)

Test as you write the code.
Write automated tests.

 

Why and when does this make sense?

  • When testing in small steps most errors can be quickly traced back to their origin
  • Testing manually is boring - awareness quickly decreases and errors slip in unrecognized
  • Testing manually is slow compared to automated tests
  • Automated tests give confidence while refactoring

(Also components of electronic devices are typically tested before they are assembled to more complex units.)

Books and Articles

Quite surely, there are many good readings on TDD at all levels and therefore it is not understandable to me why - and this is not made up, it actually happened to a close friend - a software developer was forced by the project leader to code for weeks and months without being allowed to do even a single test of any line of code she had written! You can bet: you would have seen me running out of this shop yelling loud the second or third day ... :-)