I’ve been suspicious of Unit Testing for a while now. Hey, I’m retired, I can afford to be “cancelled”. I’ll give you the skeptical argument!
I discuss the general types of tests and emphasize the importance of comprehensive automated system tests. I then ask, given we are doing a great job on system testing (that we have to do anyways), what’s the incremental cost/benefit of extensive unit testing?
I go to the Internet to see what it has to say. That was fun.
I give you my history with testing through grad school days, IBM, Algorithmics, and Electronics Workbench, discussing some cool test harnesses we built.
I then give a demo in C# about how to write Unit Tests from my trivial “hiring a coder” code I wrote back in Episode 3. I give a VERY COOL (and efficient) architecture using C# yield return, explaining how that works. I then demonstrate some simple Dependency Injection that goes along with Unit testing. I then sum up the results of my little exercise: massive code bloat and a worse design?
We then go and have a look at a paper written by James O Coplien, Why most Unit testing is Waste, that I sort of agree with..
If you disagree with me, please have a look at my video and drop a comment.
Leave a Reply