New answers tagged

1

There is exactly one point where writing unit tests would be just a waste of time: if you're already using a dependently-typed proof assistant to mathematically guarantee correctness for all inputs. That is given for an estimated 0.01% of all software development and evidently not in your case. In all situations when using a normal programming language, ...


32

Yes that is the ideal situation for Unit tests To look at a different situation - if you are writing software that will not be changed in the future then perhaps you could consider skipping the tests. I have yet to work with such software of course :) Also TDD and BDD proponents would argue that even in those cases you should still use those techniques. ...


15

Yes, the idea of writing the right form of unit-tests is that it keeps the cost of change low. If you make a lot of changes they are here to help you go faster. The biggest mistake most people make is too test implementation instead of behavior, which increases the cost of change, because you build change detectors. The tests should help you refactor the ...


6

Yes. Because those bits that do not change still need testing. The rest that does change, well, that's just a part of the process, you simply need to change things once in a while. Writing tests makes you think about the whole problem, which is alone a good practice to do. Without tests, problems might remain in the product until later, which might be then ...


Top 50 recent answers are included