Defect Management Series

Filling Out Defects

Best practices for writing clear, complete, and actionable defect reports.

Defect Management workflow cycle diagram

As you are considering any decent sized development project, you already know you need to consider the testing aspect of it as well. But there is testing… and there is TESTING. The former calls for someone to bring up the application and try it out, looking to find out if it will do what it's supposed to do, emailing the developers if they find an issue. The latter calls for a process to ensure that not only are you testing to ensure your application works, but testing to ensure that it doesn't NOT work – that any issues that arise from using the application are handled correctly, and that misusing the application (not using it in the manner expected) does not do anything to jeopardize your client's or company's bottom line with the application misbehaving in production.

An effective defect management process involves the entry, tracking, refactoring and retesting of defects, as well as the reporting of the defect statistics during the process. This particular blog will investigate how to ensure that defects are:

  • Accurately and completely reported
  • Correctly prioritized and assigned
  • Efficiently communicated to the development team
  • Resolved
  • Retested in a timely manner
  • Reported in metrics

This procedure also ensures that a repository of the defect information is maintained to provide the information needed to control the risk associated with the defects.

The test team has a significant responsibility related to the testing portions of this procedure including defect reporting, communication with the development team, defect tracking and retesting.

The Development Manager, Test Manager and Project Manager have the responsibility of determining how the defect will be resolved, usually simply to fix them and needing no special determination. However, defects can also be resolved in other ways; for instance, the defect can be deferred and moved to the issues or change management backlogs.

Development is initially responsible for reviewing and verifying the defect and estimating the total effort to repair the defect. If the defect is approved for refactoring, the developer is responsible for repairing and unit testing the code, and assigning the repaired defect back to the original tester.

Locating and repairing application defects efficiently is essential to the development process. Using the HP Application Lifecycle Management (ALM) Defects module, you can report design flaws in your application and track data derived from defect records during all stages of the application management process.

Defect records inform members of the application development and quality assurance teams of new defects discovered by other members. As you monitor the progress of defect repair, you update the information in your project.

The Hertz TCOE has identified and implemented a workflow that manages the creation, modification, and resolution of defects within ALM. ALM users based on their respective ALM role will be able to navigate through the defect workflow in a consistent and repeatable process. The following sections will describe the various statuses, permissions, transitions for defect remediation.

In order to help the process of efficiently fixing defects found in the application(s), we need to start at the very beginning: writing a very informative defect report in HP ALM for everyone to use in the following fix and retest steps. Realize that, as in anything in software development, spending a little more time to get something right and tight at the very beginning of the process will almost always save much, much more time later in the process. If the author of the defect spends an extra 5 minutes adding detail to the defect at the beginning when the issues are fresh in their mind, having just heard about it from the user, or discovered it while in the application, this 5 minutes can save literally HOURS of time for developers, testers, the BA and the Tech Lead if they have to guess at what is wrong, how to reproduce the issue, etc., a month later. That process can involve 4 or 5 people for an hour each while everyone tries to figure out what the bug is really about. Your 5 minutes of detailed explanation up front can save that time. Summary at the end, but it might help everyone to read through this.

The aim of writing a defect report is to get the defect fixed. You could say that it is to log a bug into the system to insure that it does not slip through the cracks and make it unfixed into production, or so that you can generate statistics on it later, or any number of other things, all true, but the bottom line of it is so that that defect can be fixed. Therefore the writing of the defect report MUST focus on making it as easy as possible for the team, specifically the developers, to understand the defect, reproduce it, investigate its causes, and resolve the issue.

The initiator of the defect has a VERY important role in reducing work for everyone else down the line. When the defect is first being created is when ALL of the questions should be asked and answered. If this is coming in from the field, it should NOT be a cut and paste from an email or jotting down what the user said and leaving it at that. Take this time to ask a lot of questions, write down a lot of answers, and reproduce the issue step by step, two or three times, as you write the Steps to Reproduce section of the defect.

Following are good general (and in some cases specific) information, rules and ideas about filling out good defect reports for efficient defect management at Gallagher. Please keep these in mind as you fill out defect reports and assign them to the next resource in queue.

  • Reproduce it: Once you have found a bug, you should reproduce it at least one more time, writing down every step you perform, data you enter, etc., as you do so, so that you have a complete step-by-step reproduction for the bug report.
  • Check for Duplicates: Before you get too far into creating the bug, do a quick search in HP ALM for several terms with which someone else may have entered a similar bug. Reduce clutter and extra work for everyone.
  • Clear Title: Each defect should be clearly identifiable by the defect title. Keep it short, and yet the defect report title should give a descriptive summary of the defect. Use meaningful defect titles that reveal the point of the report without further reading; the key here is to create microcontent that can fare well on its own. Give the maximum amount of information with the least amount of words. Time is finite and programmers/managers are infinitely busy. How would you describe the bug in less than 60 characters? It should quickly and uniquely identify a bug report as well as explain the problem, not your suggested solution.
    • Bad: "Software crashes"
    • Good: "Cancelling a Save dialog on screen XYZ crashes application with no message."
    • Bad: "It doesn't work"
    • Good: "Instead of showing my Inbox, it shows the message 'Your browser does not support cookies (error -91)'."
  • Locate it: Identify the field, component, screen, report in which the defect resides so that the developer (and next tester) can go directly there without having to try to figure out what you are talking about.
  • Identify the Requirement: Link back to the Requirement / Scenario against which this test case was written (if not ad hoc). This allows the developer to immediately check what this functionality should be doing. If ad hoc, describe exactly what you expected the results to be.
  • Preconditions: Each defect should be reported after building a proper context. What are the pre-conditions for reproducing the defect? What was the test environment while you got the defect? Software defects are often very sensitive. They may not show up unless all the error triggering conditions are in place and all the pre-requisites are met while setting up the test bed. Try to include all such information in your defect report.
  • Always include steps to reproduce the issue: What is painfully obvious to you as to how to see the issue may just be painful for the developer to try to figure out how you got there. Remember, you have been in the system and found, then reproduced the defect, the developer has probably engaged elsewhere developing a separate piece of code. Either a descriptive line describing how you reproduced it, for very simple problems, or a step-by-step process for more complex problems. As you define the issue, make sure you clearly separate out the issue from the steps taken to reproduce it. That is, don't just run the issue description in with the steps to reproduce it – call it out specifically.
  • Numbered steps: When you are entering in "Steps to Reproduce", use the rich text numbering capability of the entry field to number the steps. This makes it much easier for the developer.
  • Simple Description: Keep the descriptions simple. It's never a good idea to use lots of sophisticated words that everyone may not know. Keep your report description simple and easily understandable.
  • Clear, concise, unambiguous: Be very clear and precise. Use short and meaningful sentences. As a simple practice, read aloud the defect report before hitting the "Save" button. If it is not clear and you are finding it difficult to understand how to reproduce the defect yourself, chances are high that the programmer would too.
  • Spelling and Grammar: If the developer or user has a difficult time working their way through and understanding the defect because of poor spelling or grammar, not only are you wasting their time, frustrating them, and probably getting clarification questions back, their opinion of you and testers in general is being compromised.
  • Roles: If the ROLE of the user may be of importance, make sure you have identified who you are logged in as – Account Manager, Admin, etc.
  • Data: Exactly what data was used to create the defect? Often a defect is specific to the data used, especially if you are working with data that has been specifically set up for testing.
  • Actions: In your "Steps to Reproduce", make sure you enter everything you did to cause the defect. You should be taking this directly from your test case or your notes from the second time you reproduced the defect.
  • Check in other areas: Sometimes developers use the same code for different similar modules. So chances are high that a bug in one module can occur in other similar modules as well. Even you can try to find a more severe version of the bug you found.
  • Expected results: What, according to the requirement or scenario, or your understanding, should have happened. This in itself is important for the developer to know.
  • Actual results: What actually happened? This really is what the Title of the defect is all about, just make sure it is clearly defined.
  • Avoid pronouns: Don't use words like "it", or references like "the window", when it may be unclear what they mean. Consider this: "I started Billing. It put up a warning window. I tried to close it and it crashed." It isn't clear what the user tried to close. Did they try to close the warning window, or the whole of Billing? It makes a difference. Instead, you could say "I started Billing, which immediately showed a warning window. I tried to close the warning window, and the Billing application closed with no error." This is longer and more repetitive, but also clearer and less easy to misunderstand.
  • Check and recheck: Spell-check your report and read it for clarity once or twice before posting. An error now and then isn't bad but a lot of errors in your defect report might send a wrong signal about the credibility of you as a tester and about your defect reporting skills. If you exactly follow the steps you entered in to the defect reproduction area and can't get the error to occur, neither will the developer.
  • Only report one issue in a bug report: Combining multiple issues into a single bug report can be very confusing and can often result in issues when they have different causes, or cannot all be addressed at the same time. If there are several fields on a screen that do not work as expected, log them separately as they may be very different problems. IF, however, you have a date field that does not work on a screen, for instance, and note, after checking, that other date fields on other screens do not work, enter this as a single defect (date field on THAT screen), with a note that others do not work. Then talk to the developer about those other fields and make sure that they are addressed as well. If it turns out that they are totally different issues (different causes), a new defect may have to be generated, but most likely it is a single cause.
  • Report facts, not assumptions: Clearly separate facts (observations) from speculations. You should try to report only the facts as they have occurred, but if you feel you have an insight that may help the developer resolve the issue, include it after identifying it as a speculation as to what may be an underlying condition or cause.
  • Screen shots: A picture is worth a thousand words and is a lot easier to understand. Use SnagIt or some other screen capture tool, and use text, arrows, boxes and circles to identify what you are talking about. Save these as files and attach the files to a bug report and REFER to them in your Description or "Steps to Reproduce" section. Unless you are sure it is unnecessary (such as just capturing an error dialog box or something), consider capturing the entire screen to ensure that any reference points that the developer needs to investigate and solve the issue is included in the screen shot. Often just seeing something on the screen away from the action identifies or leads to the solution.
  • Email Communication: If you are communicating with a developer or user regarding a defect, with questions or with answers to their questions, try to use the same standards above that you would use for a logged bug – screen shots, numbered steps, clear, concise descriptions, etc. Be proactive in avoiding communication problems. Read it and reread it making sure that the question or response is very clear.
  • Keep the Defect Updated: Any information that is emailed to a developer/user, or discovered during other testing or discussions should be added to the defect in the defect tracking system. In this way, everyone always has the latest information on the issue.

Clear, concise, correct, complete and unambiguous, easy to read, easy to understand, lots of images if possible.