O'Reilly logo

Extreme Programming Installed by Chet Hendrickson, Ann Anderson, Ron Jeffries

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

Summary of Testing Steps

Here, in a nutshell, is a sketch of unit testing the XP way:

  1. Create a test class. Name it in such a way as to evoke the class or process you will be testing. If you are testing the Scrutinizer class, call the test class ScrutinizerTestCase.

  2. Code a setup method to create a Scrutinizer object. You may find the need to add example creation methods to the tested class to aid in the setup. Be sure to test this code, as an error in this type of code can be very difficult to debug later.

  3. Write a test. If your new behavior will change the state of the Scrutinizer instance, code an assertion to verify its current state. Then send the message for your new behavior to the Scrutinizer instance. If you don't know the message selector, ...

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