Test your use cases by walking through them with real data

By Alvin J. Alexander, devdaily.com

Quite often when I'm asked to review use cases that other people have written I ask "Have you tested them with real data?" Sadly, the answer is usually "no".

I don't know why people don't do this, but they don't. It seems like a logical thing. One time I was working with an insurance agency, and the use case (and accompanying prototype) were "complete". So I suggested that we walk through this one case with some actual data. I used my own car for an example, and as we walked through even the most obvious data (2003, Chrysler, PT Cruiser, etc.), we quickly found a few missing items. When put in detailed context like this, the customer could clearly see that data was missing. But when they spoke in general terms, they did not see the problem. I don't know why it is.

I didn't think too much of this until reading a book named "Surely You're Joking, Mr. Feynman" by Richard Feynman this morning. In a chapter titled "Would You Solve the Dirac Equation", he spoke of his approach when someone tried to explain a new concept to him. He would always ask "Is there a particular example of this general problem?" When I read that line, I thought to myself, "I'm not crazy about testing use cases with real data."

I thought I had read about using this technique a long time ago, but I haven't been able to find the reference, so I started thinking maybe I was a little crazy. When I read this story by Feynman I realized that someone else had used this technique in a totally different field, and he was obviously a tremendous scientist. In this chapter he goes on to explain that people always used to think he was a slow starter because he asked questions like this initially, but later on he would find flaws in people's approaches just because of this process.

I think it is very important to do this in Use Case Land. Walk through your use cases with real data. Think of this approach as testing your use cases ... "Unit testing for use cases" if you prefer.


devdaily logo