In TDD Failures Can Be Good

October 28, 2009 · 0 comments

Rarely is failure a good thing in life but in test driven development a failing test can be a very good thing. Many TDD developers dread the “red bar” but it is really worth celebrating and here’s why.

Developers are often under the mistaken impression that TDD is about getting to the “green bar”. This is actually untrue; TDD is about turning the red bar green! We must first get to the red bar to prove that our test can fail. A test that cannot fail is a test that is worse than worthless; it is a lie that gives us a false sense of security! Seeing the red bar first verifies that our test can fail and so we know it will serve us when it needs to.

{ 0 comments… add one now }

Leave a Comment

Previous post:

Next post: