Beware Excessive Unit Testing

It’s okay: You don’t need (or necessarily want) 100% code coverage

Christopher Laine
IT Dead Inside
Published in
7 min readNov 29, 2022

--

A Caveat

“Excessive Unit Testing” may not be an expression with which you’re familiar. It may sound like a convenient way to dodge writing unit tests (and trust me, it can be). In what we’ll talk about today, you’ll see how it’s not.

Before we go further, read all this with a goodly grain of salt. I am the first to tell off others (and myself) where there is a lack of required unit test coverage in an app. Unit tests are quite literally the first line of defense against bugs and poor quality. Most senior testing engineers will tell teams to get those unit tests in first and foremost, since these will catch a huge swath of your business logic bugs. And please do not run up the flagpole even one more time “My Code is Self-Testing”. This is crap, everyone knows it’s crap, and you’re simply trying to avoid writing tests when that is your job.

Unit tests are critical to modern software development and I will drive my teams and myself to ensure that unit tests are in the mix well before we even think about shipping code.

Excessive Unit Testing / Unit Test Madness

--

--