Quantifying Risk: The Purpose of Testing

Testing is such an integral part of our software projects that we often don?t stop to think about why we do it. We must do it! What else is there to know?

It is obvious that software that has not been tested is unready for deployment. But as painful experience has taught us, testing does not guarantee that the software is fit to deploy. Even rigorously tested software may still have hidden fatal flaws.

If zero defects is not a reasonable expectation of our testing activities, then what should we be trying to achieve? Because we cannot eliminate the risk of serious defects in our deployed products, we must manage that risk. Testing is an important tool for managing and mitigating the risk of undetected defects in our products.

Testing, at its heart, is a risk management activity.

There Will Always be Undetected Defects

We've all seen it. The system was developed and deployed years ago. It has been used daily for those intervening years. Then one day, BANG! it fails. Of course, you suspect the most recent change that was made. But there are times when the problem has been there all along. Somehow, all of the testing and use to date had not uncovered its presence. How could this happen?

Our software systems have always been complex, and the complexity continues to grow. That complexity means that there are millions (or billions) of paths through the code or potential combinations of inputs and conditions. Not only does that mean we can't do 100% testing, but it highlights the futility of thinking that testing is primarily about removing defects.

Managing Risk (a Primmer)

Risk has two dimensions; probability and impact. Managing risk involves understanding those two dimensions and taking action based upon them. Those actions can include any of these: