Let's Get It Straight, Shall We?
Let's Get It Straight, Shall We?
Submitted by jason@parlezuml.com (Jason Gorman) on Fri, 18/04/2008 - 14:54.1. Test-driven Development is:
* Write a failing test
* Write the code to pass the test
* Refactor to remove duplication
If you write the code first, that is not TDD (I mean, really! The clue's in the name...)
If you write a stub and then write tests against it, that is Stub-driven Testing, not Test-driven Development.
If you write anything other than the code needed to pass the test, that is not Test-driven...
* Write a failing test
* Write the code to pass the test
* Refactor to remove duplication
If you write the code first, that is not TDD (I mean, really! The clue's in the name...)
If you write a stub and then write tests against it, that is Stub-driven Testing, not Test-driven Development.
If you write anything other than the code needed to pass the test, that is not Test-driven...
