3 ms·
I do agree with the general sentiment of the article, but on the other hand, you should begin writing tests before it's too late and the code is too interdepend
by pilif 17y ago
I do agree with the general sentiment of the article, but on the other hand, you should begin writing tests before it's too late and the code is too interdependent to test without a LOT of effort.
When you write your tests first, you will naturally never end up in that situation.
Of course, when you see that you have a hard time at writing unit tests because, well, the units are too big, then you can (and should!) start refactoring, but how do you refactor with confidence when you don't have tests to see whether the refactoring went well?
Chicken and egg I guess.
- dalke 17y ago"but on the other hand"? Isn't that the same hand? "My own practice is to have good, automated tests, but these don't get put into place until the cost/benefit ratio makes the tests worthwhile; which is rarely at the start of the code development and always by the end." and "The important requirements are to have good, complete automated unit tests, to develop code for testing, ..."