by there · 15y ago · 0 comments
i think some developers put too much stock in unit testing and it gives them (and their managers, customers, and co-workers) a false sense of security. they end up wasting time and not really preventing as many bugs as they think it will. application logic changes and they have to write twice as much code to change the application and all of the tests that depended on that logic.
writing a regression test for a complicated routine or library is one thing, but writing a test for every method of a class just for the warm fuzzy of their test framework telling them they have 100% coverage is silly.
I've seen so many programmers start writing so much better code after adding the criterium "it has to be testable".
BTW, the killer bugs are usually not in the "complicated routine". They are more often in the simple things programmers like to think they can do so perfectly that they don't need to write tests for it. I have found many a bug in the most simple one line functions I never bothered to test.
Just wait until you need to actually write an automation test and dealt with code/developers who happen to say "well, it's hard to do that now since we have tightly written code".
Ship sinking from that point onward.