If you're stuck, find a sequence diagram

Sometimes I get stuck. I run out of test ideas. You can't tell me you've never found yourself looking blankly at the screen, clicking the same button over and over, hoping without hope that this time it will manifest the ever-coveted NullPointerException. It happens. Sometimes the well runs dry.

It can be a mix of stress, exhaustion, repetition, or a sincere inability to think of additional test ideas given what you currently know of the system. At those moments, I find that I can re-energize myself and generate new test ideas if I do two things:

  1. Find coffee (what can I say, I have a problem)

  2. Find a diagram (and if I can't find one, I make one)


Diagrams get my mind moving again. Sometimes when I'm looking at a screen (particularly a screen I've been looking at for the last four hours) my mind goes blank. But if I'm looking at a diagram, the ideas come back. I particularly like sequence diagrams and state diagrams, but I find that good use case diagrams and class diagrams can also do the trick. If I can't find any diagrams to get my creative juices flowing, I'll create my own. I often find creating a simple UCML diagram is enough to get me thinking about new risks and coverage again.
HeuristicsMichael Kelly