A simple heuristic for when you get stuck

James Bach gave me a sample application to test. It was a simple application with what turned out to be a fairly straightforward bug in it. After a few minutes of testing I started to have a really hard time coming up with new test cases to try. I was stuck.

James offered the following heuristic:

  1. Look over the test cases you have already executed.

  2. Find a pattern.

  3. In the next test case, violate that pattern.

It worked. I found the bug on the very next test case.


Previous Comments



>>>>>Creativity techniques, for heuristics

I've found this page to be useful:

It's got links to lots of idea-generating techniques.


>>>>>Too much boundary testing

The application was an IP Address syntax checker. Almost all of my test cases were test cases at the numeric boundaries (0 and 255), reserved boundaries ( through; through; and through, and using real IP Addresses (like the IP Address for the computer I was testing on). When I looked at the tests I had run, I found that I hadn't really been using all the digits available to me. I tried a random test case with various values I had not used and I stumbled across the bug.


>>>>>what was the pattern

Could you maybe explain the pattern that you violated?