I was surfing for something last night and happened to run across this blog on unit testing. Apparently, encouraging unit testing has turned into one of my personal missions. I don’t think testing is second nature to most developers. For me, the very first thing I do when starting a project is making sure that jUnit works. I also try very hard to write the test first, followed by the code… this is a much harder habit to develop!
There were two points that seemed to resonate with me that I seem to experience every day…
- The difference between thinking code works and knowing it works with
a mountain of evidence to back you up. - Reproducing a customer problem in minutes by extending an existing
test and fixing the problem.
Important or not? They work for me! Anyway, the two related post were entitled “Easy 2 Test == Less Reason to Test” and “Unit Testing is dumb”
I really recommend reading the first one, as it makes some very good “Random Observations”. Additionally, I really like this guy’s site, the graphics are really unique. (He must have an Apple!)