Bug Tracker Hell
Join the DZone community and get the full member experience.Join For Free
whether you call it a defect or bug or change request or issue or enhancement you need an application to record and track the life-cycle of these problems . for brevity, let's call it the bug tracker .
bug trackers are like a roach motel , once defects get in they don't check out ! because they are append only, shouldn't we be careful and disciplined when we add "tickets" to the bug tracker? we should, but in the chaos of a release (especially start-ups :-)) the bug tracker goes to hell .
bug tracker hell happens when inconsistent usage of the tool leads to various problems such as duplicate bugs , inconsistent priorities and severities . while 80% of defects are straight forward to add to the bug tracker, it is the other 20% of the defects that cause real problems.
the most important attribute of a defect is its defectlifecyclestatus ; not surprisingly every bug tracker makes this the primary field for sorting . this primary field is used to generate reports and to manage the defect removal process. if we manage this field carefully we can generate reports that not only help the current version but also provide key feedback for post-mortem analysis.
every bug tracker has at least the states open , fixed , and closed , however, due to special cases we are tempted to create new statuses for problems that have nothing to do with the life cycle. the creation of life cycle statuses that are not life cycle states is what caused inconsistent usage of the tool because then it becomes unclear how to enter a defect.
it is much easier to have consistent life cycle states than to have a 10 page manual on how to enter a defect.
(this color is used to indicate a defect attribute, and this color is used to indicate a constant.)
what life cycle states do we need?
clearly we want to know how many open defects need to be fixed for the current release; after all, management is often breathing down our neck to get this information.
ideally we would get the defects outstanding report by finding out how many defects are open . unfortunately, there are numerous open defects that will not be fixed in the current release (or ever :-( ) and so we seek ways to remove those defects from the defects outstanding .
in particular we are tempted to create states like deferred , wontfix , and functionsasdesigned , to remove defects from the defects outstanding . these states have the apparent effect of simplifying the defects outstanding report but will end up complicating other matters.
for example, deferred is simply an open defect that is not getting fixed in the current release; wontfix is an open defect that the business has decided not to fix ; and functionsasdesigned indicates that either the requirements were faulty or qa saw a phantom problem , but once this defect gets into the bug tracker you can't get it out.
the focus of this article is on how to fix the defect life cycle, however, other common issues are addressed.all three states above variants of the open life cycle state and creating these life cycle states will create more problems than they solve.
life cycle states for deferred , wontfix , or functionsasdesigned is like a "go directly to bug tracker hell" card!
each defect must be unambiguous
the ideal state of a bug tracker is to be able to look at any defect in the system and have a clear answer to each of the following questions.
- where is the defect in the life-cycle?
- has the problem been verified ?
- how consistently can the problem be reproduced or is it intermittent ?
- which team role will resolve the issue? (team role, not person)
the initial way to get out of hell is to be consistent with the life cycle state.
defect life cycle
all defects go through the following life cycle ( defectlifecyclestatus ) regardless of whether we track all of these states or not:
- work in process
- work complete
anyone should be able to enter a new defect, but just because someone thinks "i tawt i taw a defect!" in the system doesn't mean that the defect is real . in poorly specified software systems qa will often perceive a defect where there is none, the famous functions as designed (fad) issue.
since there are duplicate and phantom issues that are entered into the bug tracker, we need to kick the tires on all new defects before assigning them to someone. it is much faster and cheaper to verify defects than to simply throw them at the development team and assume that they can fix them.
trust but verify
new defects not entered by qa should be assigned to the qa role . these defects should be verified by qa before the life cycle status is updated to verified . qa should also make sure that the steps to reproduce the defect are complete and accurate before moving the defect to the verified life cycle status. ideally even defects entered by qa should be verified by someone else in qa to make sure that the defect is entered correctly.
by introducing a verified state you separate out potential work from actual work. if a bug is a phantom then qa can mark it as closed it before we assign it to someone and waste their time. if a bug is a duplicate then it can be marked as such, linked to the other defect, and closed .
the advantage of the verified status is that the intermittent bugs get more attention to figure out how to reproduce them. if qa discovers that a defect is intermittent then a separate field in the bug tracker, reproducibility , should be populated with one of the following values:
- always (default)
- can't reproduce
note: this means that bugs that can not be reproduced stay in the new state until you can reproduce them. if you can't reproduce them then you can mark the issue as closed without impacting the development team.
assign the defect to a role
qa has a tendency to assume that all defects are coding defects -- however, the analysis of 18,000+ projects does not confirm this. in the economics of software quality , capers jones and olivier bonsignour show that defects fall into different categories. below we give the category, the frequency of the defect, and the business role that will address the defect.note, only the bolded rows below are assigned to developers.
|defect role category||frequency||role|
|requirements defect||9.58%||ba /product management|
|architecture or design defect||14.58%||architect|
|testing defect||15.42%||quality assurance|
|documentation defect||6.25%||technical writer|
defect role categories are important to accelerating your overall development speed!
even if all architecture, design, coding, and database defects are handled by the development group this only represents 54% of all defects . so assigning any new defect to the development group without verification is likely to cause problems inside the team.
note, 25% of all defects are caused by poor requirements and bad test cases, not bad code. this means that the business analysts and qa folks are responsible for fixing them.
given that 46% of all defects are not resolved by the development team there needs to be a triage before a bug is assigned to a role. lack of bug triages is the root cause of 'fire-fighting' in software projects .
the bug tracker should be extended to record the defectrole in addition to the assigned attribute. just this attribute will help to straighten out the bug tracker!
most bug tracking systems have a category called enhancement . enhancements are simply defects in the requirements and should be recorded but not specified in the bug tracker; the defect should be open with a defectrole of productmanagement .
enhancements need to be assigned to product managers/bas who should document and include a reference to that documentation in the defect. the description for the defect is not the proper place to keep requirements documentation. the life cycle of a product requirement is generally very different from a code defect because the requirement is likely to be deferred to a later release if you are late in your product cycle.
business requirements may have to be confirmed with the end users and/or approved by the business. as such, they generally take longer to become work items than code defects.
qa should not send enhancements to development without involvement of product management.
note that 15.42% of the defects are a qa problem and are fixed in the test plans and test cases .
the only way to correctly assign resources to fix a defect is to have a triage team meet regularly that can identify what the problem is. a defect triage team needs to include a product manager, qa person, and developer. the defect triage team should meet at least once a week during development and at least once a day during releases. defect triages save you time because only 54% of the defects can be fixed by the developers; correctly assigning defects avoids miscommunication.
effective bug triage meetings are efficient when the only purpose of the meeting is to correctly assign defects. be aggressive and keep design discussions out of triages.
defects should be assigned to a role and not a specific person to allow maximum flexibility in getting the work done; they should only be assigned to a specific person when there is only one person who can resolve an issue.
assigning unverified and intermittent defects to the wrong person will start your team playing the blame game .
as the defects are triaged, product management (not qa) should set the priority and severity as they represent the business. with a multi-functional team these two values will be set consistently. in addition the triage team should set the version that the defect will be fixed. some teams like to put the actual version number where a defect gets fixed(i.e. expectedfixversion ) i prefer to use the following:
- next bug fix
- next minor release
- next major release
- won't fix
getting the defect resolved
once the defects are in the system each functional role can assign the work to its resources. at that point the defect life cycle state is work in progress .
all work complete means is that the individual working on the defect believes that it is resolved. when the work is resolved the fixversion should be set as the next version that will be released. note, if you use release numbers in the expectedfixversion field then you should update that field if it is wrong :-)
of course the defect may or may not be resolved , however, the status of work complete acts a signal that someone else has work to do.
if a requirements defect is fixed then the issue should be moved to fixed and assigned to the development manager that will give the work to his team. once the team has verified their understanding of the requirement the defect can move from fixed to closed .
work complete means that the fixer believes that problem is resolved, fixed means that the team has acknowledged the fix!
for code defects the work complete status is a signal to qa to retest the issue. if qa establishes that the defect is fixed they should move the issue to fixed . if the issue is not fixed at all then the defect should move back to open ; if the defect is partially fixed then the defect should move to verified so that it goes back through the bug triage process (i..e severity and priority may have changed).
once a release is complete, all fixed items can be moved to closed .
tracking defects caused by fixing defectsvirtually all bug trackers allow you to link one or more issues together. however, it is extremely important to know why bugs are linked, in most cases you link bugs because they are duplicates .
bugs can be linked together because fixing one defect may cause another. on average this happens for every 14 defects fixed but in the worst organizations can happen every 4 defects fixed . keeping a field called resultedfromdefect where you link the number of the other defect allows you to determine how new defects are the result of fixing other defects.
let's recap how the above mechanisms will help you get out of hell .
by introducing the
step you make sure that bugs are vetted before anyone get pulled into a wild goose chase.
- this also will catch intermittent defects and give them a home while you figure out how often they are occurring and work out if there is a reliable way to produce them.
- if you can't reproduce a defect then at least you can annotate it as can't reproduce , i.e. status stays as new and it doesn't clog the system
- by conducting triage meetings with product management, qa, and development you will end up with very consistent uses of priority and severity
bug triages will end up categorizing defects according to the role that will fix them which will reduce or eliminate:
- the blame game
- defects being assigned to the wrong people
- by having the expectedfixversion be conditional you won't have to run around fixing version numbers for defects that did not get fixed in a particular release. it also gives you a convenient way to tag a defect as won't fix , the status should go back to verified .
- by having the person who fixes a defect set the fixversion then you will have an accurate picture of when defects are fixed
- when partially fixed defects go back to verified the priority and severity can be updated properly during the release.
benefits of the process
by implementing the defect life cycle process above you will get the following benefits:
- phantom bugs and duplicates won't sandbag the team
intermittent bugs will receive more attention to determine their reproducibility
- reproducible bugs are much easier to fix
- proper triages will direct defects to the appropriate role
- you will discover how many defects you create by fixing other defects
by having an extended set of life cycle states you will be able to start reporting on the following:
- % of defects introduced while fixing defects (value in resultedfromdefect )
- % of new bugs that are phantoms or duplicates, relates to qa efficiency
- % of defects that are not development problems, relates to extended team efficiency (i.e. defectrole <> development )
- % of requirements defects which relates to the efficiency of your product management (i.e. defectrole = productmanagement )
- % of defects addressed but not confirmed ( work completed )
- % of defects fixed and confirmed ( fixed )
appendix: importance of capturing requirements defectsthe report on the % of requirements defects is particularly important because it represents the amount of scope shift (creep) in your project. you can see this in the blog shift happens . also, if the rates of scope shift of 2% per month are strong indicators of impending swarms of bugs and project failure. analysis shows that the probability of a project being canceled is highly correlated with the amount of scope shift . simply creating enhancements in the bug tracker hides this problem and does not help the team.
Opinions expressed by DZone contributors are their own.
Auto-Scaling Kinesis Data Streams Applications on Kubernetes
Batch Request Processing With API Gateway
Top 10 Pillars of Zero Trust Networks
Clear Details on Java Collection ‘Clear()’ API