Skip navigation.

Let's Get It Straight, Shall We?

Let's Get It Straight, Shall We?

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...