Sunday, 21 October 2012
Users would never do that!
In one project I worked on, we were developing a piece of software to collect data from a physical external sensor. The sensor was going to be used outside, in various locations and conditions, and it would be connected to a laptop computer where the software was installed, for the software to collect data from the device for later analysis.
As well as being the Business Analyst for this project, I was also the lead Tester (it was a very small project – just me & the developer).
During one testing session, with the software happily collecting data from our sensor-emulator (a little box of electronics built to simulate the output from a sensor, for testing purposes), I suddenly and deliberately yanked out the USB cable connecting the emulator to the laptop. The software crashed, and the laptop froze. I had to turn the laptop off and restart it.
I then helpfully reported this outcome to the developer, whose response was: “Why would you test that? Users would never do that!”
He was absolutely correct: in the normal course of events, a user would NOT suddenly disconnect the sensor while the software was collecting data. That’s just a silly thing to do!
However, this raises an important point: are you testing only for the perfect user? If all you’re ever going to test is what the users should do, then your tests are inadequate.
Because silly things do happen in the real world. Cables do get accidentally pulled out of sockets. Or deliberately, even. Or sensors stop working. Or users press the wrong combination of buttons. Or try to enter their address into the Phone Number field. Or accidentally try to delete the file/record they’re currently working on. Or... anything. And, if your system’s response to unexpected behaviour is to crash, and also crash the hardware it’s running on, that’s a problem. That’s a big problem. Systems should know how to fail gracefully, and not act like Samson, pulling the whole temple down around them in a fit of temper.
So, when I’m testing I always remember that it’s just as important to test the silly things as the sensible ones.
Which can be fun, sometimes... YANK! J
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment