6 ms·
TDD defines bugs as "things the unit tests catch". And the unit tests are very narrow. I think that if you read the article linked, you'd find that the study d
by newt 16y ago
TDD defines bugs as "things the unit tests catch". And the unit tests are very narrow.
I think that if you read the article linked, you'd find that the study didn't work that way. Any study that measures different things between experiment and control groups is not going to be sound.
Then it gets to the field, and whatever you didn't catch becomes a 3-alarm fire.
I've worked on TDD projects, and those are definitely are counted as bugs. Severity 1.
- steveklabnik 16y ago... and then you get a regression test, so that bug never happens again. And the regression test is easy to write, since all of your code is already testable, you have all the testing infrastructure in place, etc.
- JoeAltmaier 16y agoNever happens again? You already have the 3-alarm fire, its too late. That's my point exactly. You catch only what you can think of and write tests to cover.
- newt 16y agoI'm not sure how TDD makes this worse. Unless you think that it absolves you of any end-to-end QA testing. In which case, welcome to the fire.
- JoeAltmaier 16y agoI object to the TDD fundamental precept that you code to the tests. That narrows the 'testing' until its a self-fulfilling prophecy that you will have 'fewer bugs', since you defined the bugs as 'what we're looking for'. Reminds me of the old joke "A: I'm looking for my wallet. B: where did you lose it? A: over there. B: then why look here? A: the light's better"
- newt 16y agoYou're repeating your false idea that bugs in TDD come only from the unit tests. Eh, see comments above.