3 ms·
Even if you have written your application in a specific manner to achieve some technical goal, for Stack Overflow that is performance, you can still have automa
by tored 5y ago
Even if you have written your application in a specific manner to achieve some technical goal, for Stack Overflow that is performance, you can still have automated testing with end-to-end test or system tests.
I prefer that over unit tests because a test that is larger in scale does not care how you have organized your code in contrast to a unit test.
Thus you can refactor all you want and the tests stays the same. Unit tests on the other hand becomes useless when doing large refactoring because you have to throw them out or refactor them too when classes and/or functions get removed or changed.
- DerArzt 5y agoTo add to this, The whole TDD approach as described in the original book by Kent Beck advocated for throwing away your smaller unit tests after a certain point while keeping the higher level ones. This way you can still be confident in your code on the local level, but you won't get bogged down in the future when you need to do foundational changes. Sometimes I get the feeling that the TDD cargo cult members haven't read the original material.