Cost of a bug
Thursday, November 20th, 2008Everyone knows that a bug in any software product costs. The question is how much?
There is no easy way to quantify this, perhaps a macro method would be to find the yearly cost associated with QA organization and the cost of time spent by support and developer organizations.
But what about the question of when a bug is found and fixed and the opportunity cost of the time that could have been spent on new and better features leading to new revenue? What about the time and energy spent by countless people in the organization who have to spend time looking at the bug because it became an escalation and they have to “know” about it? Or perhaps more importantly what about the time spent by the customer and the resulting loss of face of the vendor?
As a developer is writing code he/she is not only writing the code for the desired behavior but is also (inadvertently) writing bugs. Most of the issues are (or should be) sorted out while the developer writes the unit tests alongside (or even before) the code. Finding and fixing a bug at the development/Unit Testing/IntegrationTesting stage is fairly easy and is cheapest. One developer or a small team is involved and this time is accounted for within the development budget. Let us call it stage-1
However some bugs remain unknown till a person or a team dedicated to finding bugs (aka QA department) hunt for them. Even though the boundary of these two organizations is blurring, QA will always be pillar in the house of software development. They perform various kinds of tests using various tools and methodologies. Finding of a bug by QA department involves some more people; there are bug reports, bug triages, some exchanges between developers and QA engineers (sometimes acrimonious), re-assessment by developer, simulation, fixing, bug verification and reports generated by QA managers. Going by the increased number of eye-balls, additional processes, intra-departmental interaction, communication gaps, not to mention some heated debates, a bug cost increases here. Even if you just account for an additional QA head involved it is at least 2x of stage-1 in this stage-2.
However, some bugs still sneak past this pillar, this bulwark of quality, and get shipped.
Now comes in new set of people or roles in this stage-3; like sales engineers, support engineers, fields engineers etc. A bug found during interop testing in a field lab or customer lab involves even more people. This means more people have to spend time to report, to understand and communicate on this bug. QA team is called in to simulate this in their lab; developers are summoned to fix it. Overall cost I think at least 1.5x of stage-2
The software then gets deployed in the customer location, running in the real world. Of course there will be bugs, that is the nature of human creation called software. Unlike a faulty bridge or building, software bugs are not apparent to the naked eye (though code reviews help), so after all these stages a new scenario is exposed in field and thus stage-4 bugs are reported. The cost here goes very high. First of all there is a larger set of people involved, a number of people from the customer’s organization, then on the vendor’s side besides the usual suspects seen in the above stages, there almost always is an expensive senior management resource in the escalation matrix. Then there are communication gaps, limited log files, difficulty in simulating the fault in the lab. Usually the development/support teams move on to next releases and find it hard and time consuming to simulate the problem. So the cost in this stage-4 is at least 2x of stage-3.
These stages also have a temporal scale, usually stage1-3 are not that far apart in time but stage-4 is an open ended (from right) scale. The later into the deployment a bug is found the costlier the whole affair is. Support engineers have to excavate an old branch, then find and fix the bug and merge it ahead in later branches. While all this happens a number of people either wait anxiously biting their nails occasionally writing mails or get involved in brainstorming for the fix. It almost qualifies for a new stage: stage-5 with 2x the cost of stage-4.
So if you pay your average developer $Y then you may end up paying $12Y for a stage-5 bug. That is 12 times more that what you would have paid if it were found by the developer. This may look inflated and too simple a calculation but in practice if you do an analysis of a bug at these different stages you will tend to agree with the order of magnitude. And in all of this I am not including the opportunity cost of lost time that could have been spent on R&D and the loss of face in front of a customer which may potentially affect future revenue.
A good testing and simulation tool reduces this cost and improves your overall bottom line. At every stage you need a good functional testing / simulation tool. When developers write their code they can do a better job with unit testing if they have a tool which helps them write regression test suites quickly and efficiently. Most of the time the reason why developers cut corners while unit testing is because they are up against tough deadlines and unit testing almost stands like an avoidable step.
But what if they have a tool like SIPr which (at least for SIP development) makes writing functional unit tests fun. So much fun that developers begin to enjoy writing tests and may even overdo them (j/k). Tools like SIPr make it very easy to create elaborate QA test suites because converting their test plans into test code becomes very simple. In fact SIPr test cases contain all the documentation and so there is “no need” for a separate test plan a simple script extracts all the documentation and create a nice report. The test suites can be run automatically or at a touch of a button.
For later stages also such tools help different set of people simulate various entities involved to isolate the problem. So as in SIPr you can simulate Proxy, B2BUA, UAC, UAS, Registrar, IMS entities, Redirect server etc with ease. What if a network element is misbehaving? No problem with SIPr you can simulate the problem in your labs in minutes, as you can generate any negative scenario without any limitation.
Even the end customer can benefit by signing off on an acceptance test plan, written on SIPr which can be put together quickly and thereby reduce later problems in field.
Even when problems do surface through these various safety nets created at various levels in the form of regression test suites, unit test suites they will be caught faster and solved faster.
If you have a stage-5 bug now, take a moment to try SIPr, simulate the bug with SIPr and see how it helps you to isolate the problem. Then after you finally fix the problem write a regression test case with SIPr. Then look at the regression test and ask yourself if you would have written this test before if you had test tool like SIPr if your answer is ‘yes’ then you would understand the value proposition instantly and our efforts would be rewarded. Even if the answer is ‘no’ then look at the time saved in just solving this problem. Finally we are sure you will enjoy using SIPr so in your moment of joy of fixing a stage-5 bug the SIPr experience would definitely be a cherry on the cake.










