3 ms·
Lets not forget about quality of unit tests. I've seen people writing completely idiotic tests that really do not prevent them from anything (like calling metho
by tx 19y ago
Lets not forget about quality of unit tests. I've seen people writing completely idiotic tests that really do not prevent them from anything (like calling methods and making sure they do not throw exceptions). Such "unit testing" is your time well wasted indeed. Another example is to go too low or too high, i.e. being unable to find a proper balance between unit/integration.
IMO proper unit testing is a skill and takes some time to acquire. Currently I am thinking about good interview questions for our candidates that help us find out how well people understand the reasons and goals of good UT.
Moreover, there are some areas of development that are notoriously hard to unit-test (with good results): Win32 UI is a good example, and even in those cases it's possible to write little, but highly effective UT-code (for instance if you have a unit-test-friendly design in place, like mediator pattern when you can "drive" your UI actions by sending commands to it).