Member-only story

The Importance of Unit Testing for Sustainable Software Development

Tomas Svojanovsky
3 min readOct 19, 2024

--

Not a member? You can read it for free here.

Unit tests lead to better code. You can hardly test code that is poorly written. It may surprise you, but that’s not the main goal of unit testing; it’s merely a pleasant side effect.

It’s a good negative indicator — it points out poor-quality code with relatively high accuracy. If you find that code is hard to unit test, it’s a strong sign that the code needs improvement.

The problem is that it works only in one direction. The ability to unit test a piece of code is a poor positive indicator. The fact that you can easily unit test your codebase doesn’t necessarily mean it’s of good quality.

Sustainability

Remember the days when you couldn’t develop any new features? No one wants to be in that situation, so the goal is…

…to enable the sustainable growth of the software project. It’s quite easy to grow a project in the beginning, especially when you start from scratch.

However, it’s much harder to sustain that growth over time.

--

--

Tomas Svojanovsky
Tomas Svojanovsky

Written by Tomas Svojanovsky

I'm a full-stack developer. Programming isn't just my job but also my hobby. I like developing seamless user experiences and working on server-side complexities

No responses yet