Every code change bears the risk of causing undesired side effects that lead to error states in the software. In order to find such errors at an early stage (and not only in production), automated tests must validate both previous functionality and new functionality of the software.
First, the project goals (vision) and a rough roadmap should be defined. The necessary budget must not be neglected here. As expected, the effort involved in developing fully automated tests is much higher at the beginning of the project than later during operation. However, a certain “background noise” always remains, as test results have to be evaluated, test cases adapted, and new test functionalities implemented.