Regression management

I am an impulsive coder by nature and began to learn the dignity of patience in a complex way of programming. One area in which I feel bad is when I modify existing code. If I do not have all the details set forth before me, I invariably skip some paths that sometimes lead to regression. I am good at coding, but I underestimate the content of the code until I read the "Implementation Templates".

So my question is, do you maintain the existing code, how do you cover all the databases and make sure that you don't leave potholes? What strategies do you use when you don't know where the code might break?

+3
source share
3 answers

Unit tests in short. You need to check the coverage to make sure that when you make changes, you can re-run the tests and make sure that nothing is broken.

If you have continuous integration, then this will be displayed as / at registration. I would check earlier / often to make sure your changes are small and that you can easily track the causes of errors.

Headache restructures unit tests on an existing structure. You will probably have to rebuild some existing library to allow dependency injection and mocking . Unfortunately, just making these changes is not without its risks, and all this indicates that you can write tests as soon as possible (and develop code for the convenience of testing).

+4

, . , , , .

, , !

0

, . , / , .

, , , , , - .

0

Source: https://habr.com/ru/post/1734796/


All Articles