When Unit Tests aren’t Enough

Unit Testing of your work is generally accepted as the mark of a professional developer. However – have you thought about what happens when you make a boo-boo on the tests you create?

You guessed it – everything goes to hell in a handbasket. If the tests are flawed, they aren’t really telling you anything. 

Sometimes it can be better (and faster)  to create an old-fashioned, Windows Forms test harness to exercise your “stuff”.

Right now, I’m working on a complex project with many dozens of classes – more of them every single day. Often we are asked to make changes to many of these classes. When I do these, all I need to do is fire up my Winforms Test Harness and press one of the buttons. I can have breakpoints in the code at strategic places, and I can view the end result in a DataGridView that’s on the form. Sure, you can do that with a unit test, but then what you’re doing is “testing a test”.

Unit Tests are definitely the way to go, but sometimes just being a Duct Tape Programmer solves the problem more easily.