Tag Archives: Unit Testing

Unicorn Testing

There’s a tester centric joke going around at the moment: to refer to unit testing as “Unicorn Testing”. Unicorn, as in mythical. As in “I’ve heard of it but never seen one”. This suggests that unit testing is practiced as the exception rather than the rule.

I was recently reminded of this when a developer reluctantly admitted to his project manager that no unit testing had been performed.

Now, it may be the case that there are no automated unit level regression tests.  It may also be that the developers didn’t take time out to run formal unit tests before handing over the build.  But does that imply that NO unit testing was performed?

I don’t believe it for a minute.

Do developers ever really write some code and hand it off without executing even once? Did Michelangelo carve David without ever checking his work? Without even once taking a step back to take an appraising look? No, of course not.

At the very point of software creation, developers test. Ever coded? When I do, I unit test every executable block of code as I write it – because it is hard to get it right first time. Perhaps I’m just a lousy developer, but I find this trial and error approach to be essential in getting working code. This is exploratory development, and is the kind of approach that lies at the heart of any craft.

Like testers, developers are craftsmen too.