Sunday, November 26, 2006

Unit test addicted

I have become addicted to unit testing. So far I haven't noticed any side effects :)

Enough small talk... This is why I like unit testing so much:
  • It forces me to initially focus on functionality.
  • It lets me refactor central code bits and see if any dependant projects break because of it.
    I have worked on projects where nobody wanted to change stored procedures on the database. Instead new stored procedures were created. Thereby not breaking existing code.
  • It lets me open up old projects that i don't remember anything about and experiment when fixing an error. It more or less functions as a description and validation of what the application does.
  • It feels good when delivering a product knowing that it actually does what you expect of it.