3 ms·
Is there a reason why someone would throw away unit tests? I've never understood this. Time was taken to write it, test it, upheave the bug, and now we want to
by softwarefounder 9y ago
Is there a reason why someone would throw away unit tests? I've never understood this. Time was taken to write it, test it, upheave the bug, and now we want to remove the safeguards that we spent time/money on? Leaving the possibility for the bug to infest again?
Scrapping unit tests is scrapping time.
- vkou 9y agoIf you are testing at the wrong layer of abstraction (Your test is tightly coupled to the implementation of your class, as opposed to its observable behavior), then refactoring your code will require refactoring the test. The correct solution to this is to not throw passing tests out, but to stop doing white-box testing. (Not to mention that a test that may pass in your CI environment may fail - frequently - in your local workspace.)