re: Getting Started with Test Driven Development VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Well, no. Unless you consider a first draft of a small piece of code to be "production code". You add A test, then add a small incremental piece of...

And before you come with the 3 rules by uncle bob with the word "unit tests" in it, take a look at this:

twitter.com/unclebobmartin/status/...

Some TDD tests aren’t small. Some TDD tests look more like integration or acceptance tests. There really aren’t any rules in that regard. So perhaps the best name of all is simply:TDD tests. Why? Because TDD tests are unique.

twitter.com/unclebobmartin/status/...

We use the term “unit” test to describe the tests we write while using TDD. But that name is unfortunate because it has no good definition. We don’t know what a unit really is.
The tests we write in TDD are written by programmers and for programmers.

twitter.com/unclebobmartin/status/...

DAO tests are unit tests.

twitter.com/unclebobmartin/status/...

There is no rule that says that unit tests can’t touch the database. Of course they can. One should be very careful, however, to avoid touching the database when the database is not relevant to the test.

Cheers.

code of conduct - report abuse