Editorials

Where Has Unit Testing Gone?

Recently I have been working with and interviewing a lot of young developers. One thing they all have had in common is that they do not know how to Unit Test. This experience prompts me to ask a few questions. I’d like to see what you think as well, so your comments will be appreciated.

  1. Am I out of touch about unit testing? For me it is the first place to start when writing code. There’s some code I don’t know how I would write without unit testing.
  2. Has Unit Testing been replaced with something else?
  3. Are they not teaching Unit Testing?
  4. Where has the drive to perfect the craft of software development gone?

I’m pretty sure the answer to all of those questions will be no. I based that on the value I find everyday using the practice of unit testing. If it wasn’t useful, why are they building it into frameworks that traditionally don’t have unit testing such as AnugularJS?

I know there are some folks out there that tried unit testing when they were writing Fortran, and they had a bad experience. They can’t understand how something that was so horrible for them back then can be any better now.

One of the things I find seems to go hand in hand with individuals not having unit testing experience, is the lack of understanding regarding how to build software. They often don’t even know what Dependency Injection means, let alone how to accomplish it. They can’t answer what a Mock is, or what value it provides.

Perhaps it’s time to do a series on basic developer tools and techniques. Come on folks, let do more than write code…let’s strive to be good at what we do.

Cheers,

Ben