Why test the software?¶
Everyone, even the best programmer, makes mistakes¶
This is an undeniable fact. No matter how great a programmer you are - we will always make mistakes.
Not every use case will always be foreseen¶
The systems we build will have tens, hundreds, thousands or even tens of thousands of possible use cases. It is very easy not to predict possible interactions between subsequent functionalities - testing allows you to better understand the system that is still alive.
In advanced applications, there may be collisions between components¶
Components, not only the purely functional but also the business ones, can get into, of course, unintended collisions. For example, it may turn out that some elements are mutually exclusive or their coexistence is meaningless.
Correcting errors early in production is cheaper than if the error is reported by the customer¶
And this is a real profit for the company - reacting to customer requests, e.g. after hours, is expensive. Tests allow to detect possible problems in advance and avoid situations in which the client comes to us with information about an error.
Testing provides information about system components¶
Writing tests requires coordinating even several elements of the system with each other, in order to properly mount them, we need to get to know them, even if we do not use them directly.
Testing increases product quality¶
High test coverage simply increases the quality of the service provided.
Avoiding complications after merges¶
When working with git it may happen that something gets accidentally cut during conflict resolution. The tests will inform us immediately. More precisely, they will start to glow red.
Safe refactor¶
Improving code to make it prettier is a never-ending process. Its purpose is not to change the way the system works - and this is what the tests stand up for! Thanks to them, we can be sure that the changes we have deployed have not changed the basic functionality.