3 ms·
> does TDD force you to comply with a target coverage metric? Of course it does. You only write production code to make tests pass. Hence 100% coverage. When
by lucianbr 2y ago
> does TDD force you to comply with a target coverage metric?
Of course it does. You only write production code to make tests pass. Hence 100% coverage.
When would any not-covered code be written in TDD?
- motorest 2y ago> Of course it does. You only write production code to make tests pass. Hence 100% coverage. No, not really. TDD just requires red-green tests when adding features. You can add a test that only checks for the happy path. More to the point, nothing forces TDD practitioners to succumb to the hypothetical slippery slope fallacy of having to follow a fundamentalist path 100% of the time. Why do you believe that nonsense if even unit test best practices stay clear of 100% test coverages?
- lucianbr 2y agoI mean if you do whatever you want and call it TDD, of course it doesn't restrict you in any way. But then any discussions about the properties of TDD are pointless. Anything you do is "just the right amount of TDD". Anyone who does less is "not doing TDD". Anyone who does more is a "fundamentalist dogmatic obsession-driven..." Yes, really.
- motorest 2y ago> I mean if you do whatever you want and call it TDD (...) If you know what is TDD then you wouldn't make mistakes such as believing each and every single unit of code must have a test. That's specious reasoning and slippery slope sloppy thinking. > But then any discussions about the properties of TDD are pointless. Not really. You're just succumbing to slippery slope sloppy thinking. Adding a red test and working your way up to a green test is self explanatory. Being contrarian just wastes everyone's time.