Improve Your Testing 4: Rediscover the ‘Why’ in Code Testing

Improve your testing skills by asking yourself the foundations that make testing work.

David Rodenas PhD
6 min readAug 31, 2024
«It will break in the future, so, better to…» Prompted by the author.

Every developer has faced that moment of doubt: “Why am I writing tests for code I know works?” Rather than being a problem, this question is the first step towards the mastery of software testing. So, let’s explore together and learn how to improve testing, from the moment of doubt in which testing seems futile, to the moment in which it seems the most useful technique ever.

From the Futility of Testing…

A decade ago, I used to go to testing meetups because I wanted to learn. Honestly, I wanted to learn, but the more I heard, the less useful I found it. And, which is the best part of meetups? After the talk, you can reach the speakers and discuss the topic. And yet, it ended up with more questions than answers.

The typical talk about testing was the presentation of library X or Y, whether it was a unit testing library or an e2e one, and they would explain the API and what calls it had. These types of talks assumed that you already knew what you wanted to do, and all you needed was to learn a new tool. I left these talks just as I had entered, maybe knowing a new tool, but not knowing why to use it, and…

--

--

David Rodenas PhD

Passionate software engineer & storyteller. Sharing knowledge to advance our skills. Join me on a journey of discovery in the world of software engineering.