×

First time here?

You are looking at the most recent posts. You may also want to check out older archives. Please leave a comment, ask a question and consider subscribing to the latest posts via RSS or email. Thank you for visiting!

I was searching my archives for sending something to my team this morning after looking at various bugs logged from customers, internal partner teams and ourselves.  I had an old post from 2005 but it unfortunately used a Shrinkster URL that appears not to be working.  So here’s the mail I sent to my team this morning.  This is purely my opinion but things that I think make a great bug report for fastest resolution:

------

As we triage and such I know that there are likely times that you are frustrated with not enough detail to even determine if this is a bug or needs investigation. This leads to feature teams spending time doing unnecessary things getting more data…and the cycle of time eventually delays product quality. To that end, when *we* log bugs I’d ask that you take into account my opinion of the “anatomy of a good bug”:

  • Title: Required. This is obvious. The title should be concise but describe the problem in one line so that someone can quickly glance at it and get a feel of the issue immediately. Something like “control doesn’t work” is not helpful. Something like “TreeView shows blank nodes when binding to hierarchical data” is much more descriptive, yet concise.
  • Path: Required. Almost every bug system requires and area/path assignment. You should do your best to assign this to where you think appropriate. If you are crystal clear, select the specific path. If you aren’t, then don’t guess too deep. Putting something at Product\Feature-Team\Feature-Area\Functional-Area\Control-Name might be too “deep” of a guess and would get bounced around. When in doubt, get up to the feature level and let triage teams who likely know the right path put it deeper or re-assign.
  • Keywords: Optional. This is helpful for you usually. If there is a place to set keywords, you should consider putting some that might be helpful for searchers or yourself. However don’t spackle keywords all over titles/descriptions.
  • Assigned: This usually defaults in bug systems to something like “Active” or “Not Assigned” – unless you know the specific person it should be assigned to, don’t guess.
  • Priority/Severity: Optional. This usually defaults in systems as well. If you think the default is not correct for your issue, then change it. But if you are changing it to a higher (read: must fix ASAP) then you owe it to someone to send an email out. Logging high-pri bugs without an email is usually not a good idea.
  • Build/Branch/Version: Required. Systems call these things different, and sometimes they are individually separated as well. However, this should be seen as required information. When someone looks at a bug they should know on what version of software you are using. They may immediately know “oh that was version 4.12, cool I know we fixed that in 4.2” and add that information to you back. Absent that information the investigator is left guessing on which build/version you were using and they may be flailing for a while with various versions. Even if there are fields for this in the system I usually always put this at the top of the repro steps as well for greater visibility.
  • Description: Required. Yes you put a title, but you still owe it to the investigator/triage to provide a bit more depth. The description should re-iterate the title, but also provide the scenario and other supporting detail. Things like “it worked in version XYZ” or “works on competitor platform Z and adds significant value to customer” are some additional data points that help understanding why you are logging it. Descriptions maintain history of the bug so pasting emails for context, etc. are entirely appropriate IMO.
    • NOTE: I used an example of “worked on version XYZ” – some systems have specific indicators whether this is a Regression or not. Even if they do I would indicate regression data in the description.
  • Repro Steps: Required. Perhaps the absolute most critical portion of your bug log. IMO this should include:
    • Version/Build/Branch
    • Steps – verbatim – yes I usually write these out with numbered lists:
      • 1. Open VS
      • 2. Create new C# Application
      • 3. Open designer and write this code
    • Once you hit the issue at hand break into Expected/Actual statements. This is where you would note what you Expected (i.e., “Control would render on UI surface”) and what was the Actual (i.e., “UnhandledException of type foo shown and crashed VS”).  In the Actual section would be a good place to paste call stacks, exception messages, etc. in addition to any simple error seen.

Here’s a template I use for the “repro steps” area of a bug report to remind me:

Repro on Version XYZ

Repro Steps:

  1. Step 1
  2. Step 2

Expected:

What did you expect to happen

Actual:

What actually happened

I find this has been helpful to continue to remind me of what is required and helpful.  Most systems allow you to create bug templates.  I have a bug template that includes this primer data in the repro steps for me.

  • Sample Repro: Required. In my opinion, this is required. There is no greater path to resolution or understanding of a given bug then by having your specific issue immediately available. Without it the repro steps are helpful but may not be detailed enough in the code that you are using as well. This sample repro should be isolated to the issue at hand and should be simple to get up and running. If you send me a zip of your ERP system and expect me to fix why text is right-aligned incorrectly, that’s a colossal waste of my time getting a huge app set up trying to find the one issue. Often this exercise of narrowing the repro also identifies some issues where it might be user code. Regardless, provide a repro and keep it simple.
    • Sometimes attaching screenshots of what you are seeing is appropriate as well to help with an issue that might be a visual one and leads to faster understanding than setting up the repro.
  • Close Bugs: When bugs are resolved back to you as fixed do your diligence to verify your bug quickly and close it out. Historically up to 15% of resolved bugs are re-activated. If we re-activate too late, we run the risk of missing key quality points in that area where you logged the bug. If you cannot verify it (because of time, out on vacation, etc.) then reach out to a test lead and indicate you cannot verify soon enough and request assistance to re-assign the Resolved bug to close.

Following these principles helps drive quality into our products. It does this by leading to faster times to get to understood, agreed-upon bugs. Please make sure we help our own team and partner teams when we log bugs to ensure we’re providing good information to help them fix what we think are issues.

------

I hope this helps perhaps as some guiding principles when you log bugs against products that you use and/or within your own team.


This work is licensed under a Creative Commons Attribution By license.


10/13/2011 5:33 AM | # re: Anatomy of a good bug report
A couple of other things we do to make things as smooth as possible (some of them are more around defect management than definition):

1) Ensure defects are as atomic as possible, we often get several defects munged together as one, meaning you could fix all but one and still not have resolved the defect. With that in mind, also don't let testers return defects with additional defects in the same report (i.e. yes you fixed screen A but the subsequent screen is broken). Munged defects should be returned to the raising party to be split into atomic chunks.

2) Link defects where possible (if the bug tracker allows), this makes triage and assignment so much easier for all concerned.

3) If you have a duplicate, always reject the later one so you can more accurately track how long the defect has been around for (having a "found in version" field is also very helpful). Consider taking comments and attachments from the later defect if they add useful information.

4) If you have a lot of defects, consider a "pool" for things that have been triaged but haven't yet been assigned out.

5) Know when to defer, place something on-hold and when to deprioritise. These can save the bacon of a project by diverting developers away from things you don't want them to touch.

6) We categorise things precisely, Defects, TODOs, Change Requests, Analysis issues etc. These help with triage and assignment.

7) >then you owe it to someone to send an email out
Many bug trackers have a feature to do this automatically, it saves people from forgetting.

There are more, but I could go on for hours :)
10/13/2011 7:01 AM | # re: Anatomy of a good bug report
I disagree with point 1 entirely Jeff.

I have been a tester and a developer. Throughout my testing career there will be times that a programmers fix to bug A has caused the next screen to completely break. It's a waste of time to then create a new defect, copy/paste the same repro steps, and then assign it. It's easier to reactivate it and assign it straight back.

Of course you'd argue and say, well how does the tester know that fix is what broke it? Easier for me, I'd step through and debug the code and see what line & change caused the error.
10/13/2011 7:14 AM | # re: Anatomy of a good bug report
D'oh, I broke my own advice and addressed two issues in a single item... Certainly your point about a "fix" breaking something else has merit (depending on the team disciplines I guess), but I feel the first part is still important because too many times I've seen "The total on Screen A is wrong and the close button is the wrong shade of purple", one of which could well be a server side issue and the other a presentation issue, making it more difficult to assign if your team are split. That's a fairly trivial example, sometimes I've seen four or five diverse defects make it into a single report, which skews the numbers.

However, when it comes to refactoring tasks, it's often the case that it makes sense to bunch up several discrete items (i.e. all the totals in the system use the wrong level of precision). So it's not really as black and white as I first presented it.
10/13/2011 7:55 AM | # re: Anatomy of a good bug report
Notice: I did not even read this article. But, it is the code's fault. Whenever an error condition is detected, my code appends a unique message ID to the error message to the user. It makes it ease to report an error and very easy to find the place in the code where the condition occured. So simple. Wish Micropsoft had thought of this!
10/13/2011 9:50 AM | # re: Anatomy of a good bug report
Two things that I think are missing from your anatomy that I believe are very important are:
Type: Bug|DCR|WorkItem|Risk|OpenIssue|etc
Category: Feature|Security|UE/Docs|UI/Design|Globalization|Localization|Accessibility|Legal|Compliance|etc.
These attributes, imho, are quite critical for maintaining a well groomed bug DB. They can be very important in helping to quickly identify and sort bug entries of particular relevance to a user.

Also - Any thoughts about when NOT to file a bug? I am personally becoming a believer that some bugs should not live in the normal bug database due to their sensitivity. For instance, a well written sev-0/Pri-0 security bug documenting repro steps of exposure of customer PFI/PII almost certainly should not be entered into the bug tracking database in detailed form - but should instead use a more secure mechanism of communication such as DRM-controlled email. A placeholder for the bug should be entered into the Bug DB perhaps to aid in SDLC life-cycle management perhaps, but not the detailed steps to execute the exploit... Bug Databases, after all, are often not the best secured systems and are frequently subject to public disclosure via legitimate means such as legal discovery and public records requests, and illegitimate disclosure by bad actors with access to the information.
10/13/2011 10:06 AM | # re: Anatomy of a good bug report
Don't forget the logs!

I agree with Jeff's point. As a developer there is nothing worse than "feature X does not work". How does it not work? In which versions?

Also regarding the steps, if there are logs then you should clear them, reproduce the error, and give identifying information so that the developer can find the relevant bits in the logs. For example user ids, time of the problem etc...
10/13/2011 11:02 AM | # re: Anatomy of a good bug report
Opening one bug or multiple bugs seems to be one of the more contentious issues between dev and test. As a manager, I believe it’s better to have too many bugs than a few overloaded bugs. We've found these rules to be helpful:
A) Never create a bug with multiple issues unless you are certain they are all related and will be fixed with one fix. Each bug should be tracked as a different issue—what do you do if three of four issues are fixed and the fourth is Won’t Fix?
B) Never reassign a bug and add a new issue. You should always create a new bug for the new issue. For example, do not reassign a bug to the doc team to create a release note. The resolution of the bug and the resolution of the release note are two different issues.
10/13/2011 3:09 PM | # re: Anatomy of a good bug report
Very good article! :)
The guidelines I've always followed are:
"The best bug report is the one which makes everyone reading, trying to reproduce or fixing it ask nothing further." :)
10/13/2011 11:45 PM | # re: Anatomy of a good bug report
Nice information
10/14/2011 10:00 AM | # re: Anatomy of a good bug report
redmine, one word, try it :) saved us a lot of time, tracking is easier ...
10/14/2011 10:02 AM | # re: Anatomy of a good bug report
I concur on the advice to keep separate issues in different bug reports. Putting multiple items in a single report or keeping a report open for a stream of different changes makes priorization almost impossible and usually means that the "Repro Steps" portion was not done. If the Expected result was acheived, the issue is closed - if different results are Expected, a new item needs to be opened, triaged, and prioritized.
10/30/2011 5:00 AM | # re: Anatomy of a good bug report
This assumes the reporter already knows his problem is a bug. Which is the most frequent flaw in a bug report: Reporting something that isn't a bug.
12/6/2011 11:07 AM | # re: Anatomy of a good bug report
This may not be applicable to your particular set of applications but something I have found to be of great importance in the past when documenting bugs is to include any environmental anomalies and user anomalies.

Environmental Anomalies - anything that differs from what the developers would expect. For example, a user who runs multiple versions of one or more MS Office products. if your app integrates with an MS Office product (i.e. porting data to Excel) then it's important to know if a user may have multiple versions.

User Anomalies – This is harder to define so I’ll give some personal examples from previous bugs for apps I used to work on.
1) User is anti-mouse and while they have mouse the user does everything via Keyboard even when using a mouse would be more efficient.
2) User has unique multiple-monitor setup (this was from back when multiple monitors were not common)
3) User Never tabs out of field after entering data. This one ended up being the key to resolving a very hard to find bug that was not reproducible and that was specific to a set of accounting users who because of how a previous accounting software system worked, were unconsciously not tabbing out of a date field and the end result was bad dates were passed to the system.


Otherwise this was a great article.

 
Please add 7 and 3 and type the answer here:

All postings/content on this blog are provided "AS IS" with no warranties, and confer no rights. All entries in this blog are my opinion and don't necessarily reflect the opinion of my employer or sponsors. The content on this site is licensed under a Creative Commons Attribution By license.