Testing is not a Feature

This post is a few years old now, so some details (or my opinions) might be out of date.
I would still love to hear your feedback in the comments below. Enjoy!

I pointed out to someone at work today that PyDev 2.5.0 now offers really cool TDD support. I’m not a huge TDD proponent or anything, but this stirred up a discussion. This guy, let’s call him John, said that “TDD may shorten the time it takes to develop a feature, but sometimes a feature is so urgent we may want to deliver it as quickly as possible and test it later”.
Sentences like that make me weep.

I tried to explain that without testing, the risk of releasing a piece of code is unimaginable. As important as a feature may be, the product might be seriously broken. Especially when using Python, where very few issues come up during build (A simple typo can cause an AttributeError during runtime, or worse). I claimed the risk was too great. John replied “That may be, but the right to decide whether the risk is worth it, is reserved to the project manager. If you use TDD, you deprive him the option to give up testing for later”.

Seriously, I don’t know how to handle this kind of logic. Sure, my boss has a right to tell me whether to test, or not to test, my code, but… should he? Can a construction worker reasonably be told to just lay bricks together and leave the mortar for later?

This thinking is wrong, in my book. Testing is not a feature. It’s not a requirement set by the client. It’s not “nice to have”. It’s an integral part of any piece of software.

Sure, you can build software without testing. It may even work, in the same way that a bunch of bricks may look like a wall. But if it gets too windy, it’s probably gonna fall on someone’s head.

How do you respond to these kinds of opinions?

Discuss this post at the comment section below.
Follow me on Twitter and Facebook

Similar Posts