3 ms·
I think the cost of unit tests when changing code also varies with the quality of the design. If your code manages to some degree to follow the open/closed prin
by ajmurmann 10y ago
I think the cost of unit tests when changing code also varies with the quality of the design. If your code manages to some degree to follow the open/closed principle you should be able to just throw out some of your classes. On the other hand that also implies that maybe in those cases the unit tests could have been tossed earlier. However, there always will be things that won't be extended but actually need to be changed and you won't know in advance which is which.
I do however like the idea of unit tests as a scaffold that guide you to build the right thing and then you toss them. Usually I have only very few construction sides in my code base that I am confident enough to burn the scaffold down. It would be an interesting idea to TDD a project and always delete all unit tests after you are done with them and only keep cheaper acceptance tests around. Maybe you would actually ho faster