Test-first software development helps us build testable behaviors and support refactoring.
I’ve already written about the importance of getting to the red bar and the value of a failing test but once we get the red bar we want to move on and get to the green bar as soon as possible. In fact, turning the red bar green, which is really what TDD is all …
Continue reading “Green Bar Guilty Pleasures”
Read MoreMany important things happen getting to the red bar. In a test first approach where we write our test before we write our production code, we define the method signature before we build its implementation. That means we are thinking about how to call a method before it is written. This reinforces designing to interfaces …
Continue reading “Celebrate the Red Bar”
Read MoreDon’t we get the most value from our tests when they fail? We may wear our seatbelt every time we get in the car but when we get into an accident and use our seatbelt is when we are most grateful for having it. This is also true with tests. It is not until a test breaks …
Continue reading “When Are Tests Most Valuable?”
Read MoreRarely 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 …
Continue reading “In TDD Failures Can Be Good”
Read MoreA few months ago I was visiting a client who was having a lot of problems using TDD. “It takes over half an hour to run our unit tests,” he said. “You are not doing TDD,” I said. “In order for tests to be valuable, all of them must run fast—within a few seconds, or …
Continue reading ““That’s Not TDD””
Read More