|
|
|
|
|
by bluGill
2900 days ago
|
|
This is both correct and incorrect. Correct that the goal is to prevent regressions. I claim (I don't know how to study this) 80% of your tests will never fail and so they could safely be deleted - but I have no insight into which tests will fail so I say keep them all. Incorrect because in fact it isn't hard to localize failures: it is something in the code you just touched! |
|
Yes, but you also need to localize the effect of the bug to know why is it that the code you changed broke the program (and remember that we're talking about a case where the rest of the program is not familiar to you enough). Good unit tests can help you find the immediate effect of the failure, rather than the ultimate one.