A few reasons why writing unit tests makes everything better!

The most common reason you’ll hear is that it protects you from introducing new unintended bugs or breaking existing functionality in the existing code base. Since unit tests cover the rest of the code verifying it’s correct behavior. Giving you more freedom to refactor and improve your code as a happy consequence.
Yet there are more reasons to write unit tests, which become more apparent if you work in a team and on larger projects. This post will be the first part in a series about unit testing and reaping it’s benefits. In this first post I will go more into the reasons why we unit test in the first place, reasons that I believe justify the investment in time and effort in a big way.

Continue reading