Skip to main content
6 events
when toggle format what by license comment
Mar 13, 2014 at 5:26 comment added sea-rob Good answer. I'm actually a little flabbergasted, because I thought it was really explicit that TDD means "write the tests before you write code". But I see people use TDD synonymously with unit testing. Which misses the whole point of the methodology. But there's a lot of confusion about unit testing in general. For example, I've worked with lots of folks who don't see (and don't care about) the distinction between unit & integration tests. Hm. And reading the comments to the linked article, there is tons of confusion about what "unit" means. Arg.
Jun 25, 2011 at 14:13 comment added David maybe you're right, or maybe we're missing the "path" or "strategy" that will allow us to have complete tests. At some point in your example, the (production) code is doing more than what is tested for. The code seems to have taken a step too far. Maybe there was an other test that should have been written first. The question is "is it possible, using a deterministic method, to find that test ?". This article doesn't give the answer, but it clearly tells us that there are strategies to find.
Jun 24, 2011 at 14:38 comment added Aidan Cully @David: I read that article, but I don't think it addresses the concern. Basically, I see "unit tests" as providing an operational specification of the unit's expected behavior, while "TDD tests" are tests written following the TDD process. I've noticed a few times that, after following the TDD process for a while, the resulting code is complete, but the tests don't fully describe the intended behavior - there's room for bugs in the code. At this point, we can write unit tests to cover those remaining cases, and we don't expect to have to change the code under test unless bugs are discovered.
Jun 24, 2011 at 11:41 comment added David I read an article from Uncle Bob, in which he suggests that their might be a right order in which we should "transform" our code and tests step by step. Maybe the answer to your issue lays in "the choice of the next test to write". And there might be a strategy to find it and avoid the issue you are describing. See this article : cleancoder.posterous.com/the-transformation-priority-premise
Jun 24, 2011 at 10:51 history edited Aidan Cully CC BY-SA 3.0
TDD tests are a subset of Unit tests.
Jun 24, 2011 at 10:45 history answered Aidan Cully CC BY-SA 3.0