O'Reilly logo

Questioning Extreme Programming by Pete McBreen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 12. Test First Development?

Tests are great for showing that a feature is not yet implemented.

It has always been an article of faith that programmers cannot really test their own code because they know how it works. Strange as it may seem, Extreme Programming does not challenge this idea; instead, it tries to build on it. Test First Development requires that the Unit Test be written before the production code.

The idea is that before the method is written, the programmer does not know how it will work, so it is safe for the programmer to design the tests. After all, the programmer knows exactly what she wants the method to do, so it is simple for her to write a test that verifies that the method does the right thing.

But Do Programmers Know ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required