Estimating Software Testing Time and Cost

If you test software, at some point you’ll have to estimate how long some testing effort will take, or how much the effort will cost. In most situations, this boils down to estimating time because cost is generally time multiplied by some money rate. So, let’s just think about estimating the time required for a testing effort. The answer is pretty easy: you just have to estimate based on your experience with similar projects (as well as other experienced engineers’ estimates). Now that said, you can provide a better answer than just a wild guess. One simple technique I like to use is called the beta probability distribution technique. It is very simple. You estimate an optimistic time, a best-guess time, and a pessimistic time, and then compute a weighted average with weights 1, 4, and 1. For example, suppose you are trying to estimate how long it will take to write a set of 3,000 unit tests. If your optimistic time estimate is 3 weeks, your best-guess estimate is 5 weeks, and your pessimistic estimate is 9 weeks, your beta distribution estimate is ( 1*3 + 4*5 + 1*9 ) / 6 = 32/6 =  5.33 weeks. Additionally, if x is your optimistic estimate and y is your pessimistic estimate, then the standard deviation of the beta estimate is sqrt( (y-x)*(y-x) / 36 ) = sqrt( (9-3)*(9-3) / 36 ) = sqrt(1) = 1.00 weeks. So, you can make an interval estimate like, "Using an 80% statistical confidence level, I estimate the testing effort will take 5.33 weeks, plus or minus 1.28 weeks." Like any project estimate, it is crude. But even a crude estimate is better than no estimate at all.

This entry was posted in Software Test Automation. Bookmark the permalink.