These steps come from an essay on bug reports, a chapter of the Google SRE book, a short book of debugging rules and the guides of WebKit and Mozilla. We put them in the order of one case, from the first report to the checked fix.
Simon Tatham1. Get the facts
In his essay from 1999, Tatham writes that if programmers can make a bug fail, they will try to gather extra information until they know the cause, and if they cannot, they will have to ask you to gather that information for them. You can either show them in person, he writes, or give them careful and detailed instructions on how to make it fail. He asks you to state what you saw and also what you expected to see, and to write down the error messages, especially if they have numbers in. We take from this that each report gets the steps, the exact words of the error and what the customer expected, before anyone tries a fix.
“So tell them exactly what you did.”
How to Report Bugs Effectively, 1999Chris Jones, Google SRE2. Triage by impact
In the chapter on troubleshooting of the Google SRE book, Jones writes that an effective problem report should tell you the expected behavior, the actual behavior and, if possible, how to reproduce it. Problems can vary in severity, from one user under very specific circumstances to a complete global outage, and your response should be appropriate for the impact of the problem. In a major outage, he writes, your course of action should be to make the system work as well as it can under the circumstances. We take from this that each report shows how many customers it hits, so your team sets the priority with the facts at hand, and a report that blocks many customers goes to your team right away.
“Stopping the bleeding should be your first priority”
Effective TroubleshootingDave Agans3. Make it fail
Agans puts the second chapter of his book Debugging on his site as an excerpt, and it is a list of nine rules. The rules include Make It Fail, Quit Thinking and Look, Change One Thing at a Time and Keep an Audit Trail. We take from this that each bug report gets tried in a test account step by step, with one change between two tries, and each try goes on the record.
“Here is a list of the rules. Memorize them.”
Debugging, chapter 2: The Rules, Suitable for FramingWebKit4. Cut it down
The WebKit guide to test case reduction gives the basic idea: take a page that demonstrates a problem and cut it down until the least content still shows the original problem. Its reduction process is to remove one element at a time, save and reload the test case, and if removing an element in the head of the page makes the problem stop, it says, you may have found one piece of the problem. With a reduced test case, the guide says, the development team will spend less time identifying the problem and more time determining the solution. We take from this that the steps of a reproduction get cut down to the fewest that still fail, and the ticket names the step that makes the difference.
“remove as much content as possible while still reproducing the original problem”
Test Case ReductionMozilla5. Write the ticket
The bug writing guidelines of Mozilla say that if a developer is able to reproduce the bug, the bug is very likely to be fixed. After the steps, they ask you to describe the observed result and the expected result precisely, and to clearly separate facts from speculations. Before a new report, they ask you to check if the bug has already been reported. We take from this that a new report that matches an open ticket goes onto that ticket, and each new ticket puts the steps first and the guesses last.
“Steps to reproduce are the most important part of any bug report.”
Bug Writing GuidelinesChris Jones, Google SRE6. Check the fix
Once you have found the factors that caused the problem, the SRE chapter says, it is time to write up notes on what went wrong, how you tracked down the problem, how you fixed it and how to prevent it from happening again. The last of the nine rules of Agans reads: if you didn't fix it, it ain't fixed. We take from this that a case closes after the fix is tried again in the same steps that failed, and the notes of the case go on the ticket and into the known issues for your support team.
Effective Troubleshooting