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

Test Everything Example

Regarding our rule, Test everything that could possibly break, a correspondent wrote to Ron:

"Everything" means just that, right? Software can do lots of desirable and undesirable things, and XP is supposed to test for everything.

That strikes me as either impossible (number of execution cycles approaches infinity) or vague (we know the previous, so we test for almost everything or some other such subset).

Here's a short example of how we would test an object. We'll do the thing in Smalltalk because we can do it faster. We'll comment the code for folks who don't know Smalltalk very well. We're sure you'll do fine.

The task is to build a class named Account that holds collections of transactions and that can answer the ...

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