Tuesday, August 17, 2010

Test “Those” Other Ideas

Experience is the best teacher in the world. I have been paying more attention than usual during the last few months. Most of the defects I am finding in the software I test are found in the extended part of my test cases.

You see, I never have enough time to perform all the testing I would like. There's even less time to write the test cases in a detailed fashion. Under the pressure of having to write down the test cases planned for execution, I have adopted the following practice. I'll start by writing a test case to execute the requirement's happy path and other basic testing techniques such as boundary testing.

The Happy Path is the path you would follow if you wanted to make sure that without stressing a system at all; it works as expected. You use only the most obvious input parameters; run one test at a time; and make sure you don't click on the wrong button. Bottom line, you take it easy, very easy on the system. In my experience, these tests normally pass.

Sounds like we have a good program, right? Not so fast! Here come the real tests those that we may not have enough time to clearly define or document. I've found that jotting down the ideas for extending the test cases and then executing the ideas has resulted in a greater bug finding rate. Before I documented the extended test ideas, I would either define complex, hard to follow test cases or perform exploratory testing around the requirement with some variations of the test case. However, this on the fly approach is not as useful as making a conscious effort to think about and write down the variations before beginning the test process.

It's important to execute all these variations. Many times, I have found myself thinking that out of the first many steps I haven't found a bug. I get a hunch that next step, which is a variation idea I wrote down, is where I'll run into a bug. Guess what? It works. It works more than anything because this is where I exercise the system and make it sweat. It's where you demand more from your system that you'll find its weakness.

Give it a try; your system will thank you.