4 ms·
95% of the time when a unit test fails for me, it is the test that need fixing instead of my code. It hardly inspires confidence.
by mobjack 7y ago
95% of the time when a unit test fails for me, it is the test that need fixing instead of my code. It hardly inspires confidence.
- winrid 7y agoIs that because you're not writing tests while you're adding code and just breaking old tests?
- qznc 7y agoTo me this suggests that there is no clear understanding what your units are supposed to do. My second theory would be that the unit tests are written by the inexperienced developers while the good developers write the other code.
- mobjack 7y agoThe tests will involve 5 mocked dependencies just to test a simple if statement. They test the implemention and are a waste of time. Isolated units that are well tested usually don't need to be updated in my experience so they rarely break.
- jrhurst 7y agoTests that have 5 mocked dependencies is usually a signed we done messed up somewhere.
- littlestymaar 7y agoThat's also my experience, but consider how many of the remaining 5% would have led to a regression that would have gotten shipped in production if the test didn't caught it ? In my experience, this number way above zero.