Lights-Out Test Design


One of the pitfalls to avoid is paying equal attention to everything. This is the well-known "test everything" syndrome. The slowest-moving, most bloated, most bureaucratic "waterfall" software project in the world didn't include time to test everything, so you can expect to have to skip something on a fast-moving XP iteration. The trick is in knowing what to concentrate on and what to ignore. We can't give you an algorithm for making this distinction, but we can sum up the key ingredient in a single word: risk.

Design your tests to minimize risk. Even if this seems obvious, it's still easy to fall into a trap where you devote an inordinate amount of attention to an area, not because it's especially risky but because it's an easy area for which to design tests. Maybe you just have a ton of detailed information about that area, like a list of fields with all the various types of allowable values and optional/required specifications. It's easy to design tests that go through lots and lots of combinations, but if this isn't a risky area, why bother? Here's one of Tip's favorite stories about this:

A man comes home after working late into the evening and notices his neighbor on his hands and knees under the light at the end of his driveway. When he asks what's up, the neighbor replies, "I dropped my key and I'm locked out till I find it."

Being on good terms with the neighbor, the man immediately joins him on his hands and knees. After searching fruitlessly for a few minutes, he asks the neighbor how long he's been looking. "I just dropped it five minutes before you got here," the neighbor explains. "I can't believe we haven't found it yet."

They search for another five minutes or so, and finally the man says, "Show me exactly where you were standing when you dropped it. Maybe we can reconstruct the trajectory it took." To his great surprise, the neighbor walks up the driveway and onto his porch. "I was just getting ready to unlock the door," he explains, "when I sneezed and dropped it."

Exasperated, the man asks why in heaven's name they've spent the last twenty minutes looking under the light when the key was dropped on the bloody porch. The neighbor answers sheepishly, "Well, my porch light is burned out, and I was afraid I wouldn't find it in the dark."

In the next chapter, we'll share our experience of useful ways to get all these details down into an executable form the whole team can understand.



Testing Extreme Programming
Testing Extreme Programming
ISBN: 0321113551
EAN: 2147483647
Year: 2005
Pages: 238

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net