Testing is a crucial part of ensuring that software continues to work as the initial design expected. Things often tend to break when changing existing codebases and often not directly in the places you are working on when errors occur.
This is where automated testing can help. If done correctly critical parts of your site, module and/or plugin can be tested in such a way that ensures you are notified when anything stops working as expected and before shipping any code to production. Reducing bugs before they are discovered by clients in production saved you the time of debugging the bug and communicating with the client, win-win.
# Craft Testing Framework
On top of all the tools that Codeception and Yii 2 natively provide for testing. Craft adds its own layer of support to ensure Craft specific concepts such as Elements & Project config are supported.