Recently, during a discussion on unit testing, I made an inadvertent comment about how unit testing is like desk-checking a function. That comment was treated with a set of blank stares from the room. It looks like desk-checking is no longer something that is taught in comp-sci education these days. After explaining what it was, I felt like the engineers in the room were having similar moments I had when a senior engineer would talk about their early days with punch cards just after I entered the field. I guess times have changed…
Anyway…
What followed was a very interesting discussion on what Unit Testing is, why it is important and how Mocking fills in one of the last gaps in function oriented testing. Through this discussion, I had my final Unit Testing light bulb moment and it all came together and went from an abstract best-practice to an absolutely sane and necessary best practice. This article puts out a unified view on what Unit Testing is, is not, and how one can conceptualize unit tests.
Continue reading “Desk-Checks, Control Flow Graphs and Unit Testing”