January 29, 2007

Is your testing process under control : Control Charts for beginners

I am going to attempt in this blog to keep the topic of control charts very simple.  This is what I mean by complicated : "A control chart is a run chart with confidence intervals calculated and drawn in.  These Statistical control limits form the trip wires which enable us to determine when a process characteristic is operating under the influence of a Special cause".

This is what I mean by simple definition :

"A control chart is a set of data points plotted chronologically in time sequence with five horizontal lines drawn on the chart:

  • A centre line, drawn at the process mean
  • An upper control-limit (also called an upper natural process-limit drawn three standard deviations above the centre line;
  • A lower control-limit (also called a lower natural process-limit drawn three standard deviations below the centre line.
The above definition if for a X bar control chart or also called as a Shewart control chart (named after its inventor). The whole idea of such a chart using 3 sigma control limits is that data points will fall inside 3-sigma limits 99.7% of the time when a process is in control. Thus one could say that anything beyond the control limits requires investigation. So how do you draw one?
Let us assume you test weekly builds. And you have to finish by Friday EOD what you get on Monday. But you notice that sometimes you are late by 2 days. Sometimes early by 1 day. Let us say you have 30 weeks of data. How can you know how was your process variation. Every process varies. Thus you may say it is alright to be one day late or one day early. But mathematically, how can you say should it be one day or two days? And more importantly was there a week where there was something abnormal in your process which requires more investigation. This is where a control chart can help.
Click on the link above to see an example and know how to use excel without any special add on to draw a control chart.
From the chart you shall notice that there are two data points (two weeks) which are beyond the control limits and that is what you shall investigate further:
As you plot the chart for further weeks, your process is stable if all data points are within the control limits. Your process is capable if you are able to reduce the control limits (variation). As per the first 30 weeks data, you have such a poor variation that you may be 15 days late or early. Thus seems ridiculous. So you can draw the control chart again, removing the special causes (the two weeks) and find out how capable is your process and whether with time the variation is reducing.
This was just a precursor. Read more about types of control charts, common and special causes of variation. The internet is full of examples on the same. Apply to other metrics than schedule slippage to bring your testing process under control.

January 22, 2007

How to estimate number of test iterations

How to estimate test iterations?

A common question that comes up in the Mind of a Software Tester trainings conducted by ZenTEST Labs is how to estimate number of test iterations. A good way to do that is to compute bug insertion rate and bug fix rate by the development team. Once this is done, you can easily estimate number of iterations to test.

E.g. : You have been asked to estimate the number of more test iterations required. You are at the end of round one. You can find the usual bug insert rate by developers in your organization when they fix bugs. As well as find the usual bug fix rate (number of bugs that usually get fixed when you report 100 bugs).  Thus in your organization if the bug fix rate is 50% and the bug insert rate is 10% (it is usually not this high), then this is how you shall calculate. Let us assume that the number of open bugs today at the end of iteration one is 100. Thus in round two, 50 bugs shall be open and 10 more shall be introduced. Thus, at the end of round two, you shall have 60 bugs. In round three, you shall have 30 bugs fixed and 6 introduced. Thus you shall be left with 36 bugs. Keep doing this calculation till you arrive at zero or one bug. That shall tell you the number of iterations.

The attached excel file shall be of help in this calculation Download estimation.xls

Consider the following as well:

a. You may be asked to estimate number of iterations at the beginning of the project and not at the end of round one. In that case, you shall estimate the number of bugs at the end of round one and perform the above calculation.

b. Consider finding averages in your organization for different rounds. It is possible that your average bug fix and insert rates are higher in the initial rounds.

c. You could apply further math to this basic idea and tailor this to your organization. For instance, Lloyd Raden from Grove Consultants recommends you to use nested rate as well.

d. Note that this is not a pure statistical way. But, in our experience we have found it simple and practical to come up with an estimate on number of iterations than use SWAG (Scientific Wild Ass Guess).

My Photo