4 ms·
I believe the time taken to write tests for things that have never failed is wasted. Yes yes yes. I've seen a lot of tests that, if they failed, would have me
by Afton 17y ago
I believe the time taken to write tests for things that have never failed is wasted.
Yes yes yes.
I've seen a lot of tests that, if they failed, would have meant that a thousand other tests would have also failed, and that test would have been simply more noise.
- LargeWu 17y agoThen you're either a)not testing correctly or b)writing code with too many dependencies, or c)both. If a thousand tests break from a single code change, this should be a code smell that says your architecture needs work. This is where testing gets its real value. Finding bugs is just a side effect of testing. The real value is that testing helps you design good code.
- run4yourlives 17y agoI think he means the reverse though. It's not that a single line of code causes thousands of failures, it's that you'll never get that particular test to fail unless pretty much everything else is failing to, ergo it's a useless test. I don't necessarily disagree with your point, just clarifying.