Requirements Engineer

All guides

How to Write a Bug Report: Structure, Template and Example

A good bug report lets the person fixing the problem see it on their own screen without coming back to you with questions. This guide covers what belongs in a report and shows a complete one.

Write a bug report with AI

A bug report describes a defect in an existing product

A bug report (also called a defect report or bug ticket) records that software behaves differently from what it should. It lists the steps that trigger the problem, the expected and the actual behavior, the environment and the severity. Its purpose is to let whoever fixes the bug watch it happen. Simon Tatham made this point in his 1999 essay "How to Report Bugs Effectively": the aim of a bug report is to let the programmer see the program failing in front of them.

The starting point is what sets a bug apart from other ticket types. A user story describes behavior that does not exist yet and that users want. A bug describes behavior that should already work and does not. A task is technical or organizational work without direct user value, such as upgrading a database. An epic groups a larger initiative that gets split into several stories. If you are unsure, ask whether there was an agreement, a specification or a reasonable expectation that the software works differently. If so, you have a bug. If you would simply like the agreed behavior to change, write a story.

Structure and template

A bug report has seven parts. Most issue trackers offer them as fields.

  1. Title: one line that identifies the defect. It names the symptom and the condition under which it occurs. Mozilla's Bugzilla guidelines suggest about ten words and contrast "Cancelling a File Copy dialog crashes File Manager" with "Software crashes."
  2. Steps to reproduce: numbered, one action per step, starting from a defined state (which account, which page, which data).
  3. Expected behavior: what should happen after the last step, ideally with a reference to a requirement, an acceptance criterion or the documentation.
  4. Actual behavior: what happens instead, including the exact wording of any error message.
  5. Environment: device, operating system, browser and version, software version, test or production environment, account or role.
  6. Severity: how much the defect affects users or operations. The tool on this site uses critical, high, medium and low.
  7. Attachments: screenshot, screen recording, log excerpt, time of occurrence.

A template you can copy:

Template

Title <symptom> when <condition>

Steps to reproduce

1. <starting state: account, page, data>

2. <action>

3. <action>

Expected behavior <what should happen, with source>

Actual behavior <what happens, exact error message>

Frequency <always, sometimes (x of y attempts), once>

Environment <device, OS, browser and version, software version, environment, role>

Severity <critical, high, medium or low> with a short reason

Attachments <screenshot, video, log with timestamp>

A complete example from an appointment booking system

A dental practice uses an online booking page. A patient calls because the confirmation email showed the wrong time. A tester on the vendor's team reproduces the case, narrows it down and files this report:

Good example

Title Confirmation email shows time one hour early for appointments after the switch to standard time

Steps to reproduce

1. Open the public booking page for a practice set to the time zone America/New_York.

2. Pick any appointment slot on or after November 1, for example November 12 at 10:00 AM.

3. Enter a test name and email address, then click "Book appointment."

4. Open the confirmation email.

Expected behavior The email shows the booked time, 10:00 AM, matching the booking page and the practice calendar.

Actual behavior The email shows 9:00 AM. The booking page and the practice calendar both show 10:00 AM. For slots before November 1 the email time is correct.

Frequency always (6 of 6 attempts, two different practices).

Environment production, booking version 2.8.0. Booked in Chrome 131 on macOS 15 and in the Gmail app on Android 15. The email time is wrong in both.

Severity high. Patients who rely on the email arrive an hour early or plan around the wrong time. The booking itself is stored correctly.

Attachments screenshot of the email next to the booking page, booking ID of the last test, sent at 2:15 PM EST.

The report starts from a state anyone on the team can set up. It names a concrete slot, so the expected result can be checked. The key line is the one about slots before November 1. It narrows the condition down to the date without guessing at the cause. The severity comes with a reason. The note that the booking is stored correctly tells the team where the damage stops.

A weak example and what is missing

The same observation often arrives like this:

Weak example

Title Emails broken!!!

Ever since the last release the confirmation emails are wrong. Probably the server clock is off. Please fix ASAP. Also the calendar loads slowly sometimes.

The title names neither the symptom nor the condition. In a backlog it cannot be told apart from any other email issue. There are no steps, no example appointment, no description of what "wrong" means and no environment. A developer who happens to test with an October slot would not see the problem. The guess about the server clock sends the search in a direction before anyone has seen the bug. The slow calendar is a second defect that will get lost in this ticket. Instead of "ASAP" the team needs a severity with a reason.

Common mistakes in bug reports

Diagnosis instead of observation

People who report a bug often have a theory about the cause. Tatham's advice is to always state the symptoms and to treat a diagnosis as an optional extra, never as a replacement. Write down what you saw. If you have a theory, label it as one and put it at the end.

Steps with gaps

"Book an appointment, email is wrong" assumes the reader knows which date you picked. Write the steps so that someone with no background can follow them. Before you submit, run through them once yourself from the start, ideally in a fresh browser window. That is often when you notice a step you took without thinking.

Several bugs in one report

The Bugzilla guidelines are direct about this: open a new bug report for each issue. Two defects in one ticket are rarely fixed at the same time, so its status will be wrong for one of them. If you suspect two bugs are related, file two tickets and link them.

Vague error messages

"I got an error" does not help much. Copy the exact wording into the report as text, including any error codes. Text can be searched. A screenshot can only be looked at.

Severity and priority answer different questions

Many reports are marked critical to get faster attention. That makes the rating useless. Severity describes impact: how badly does the defect affect users or operations? The reporter can judge it because they saw the bug happen. Priority decides the order in which the team fixes bugs. The product owner usually sets it together with the team, because deadlines, effort and other work matter as well.

A common rule of thumb for the four severity levels:

  • Critical: a core function fails, data is lost or there is a security hole. There is no workaround.
  • High: an important function is broken and the workaround is awkward or unknown to users.
  • Medium: a function is limited and a reasonable workaround exists.
  • Low: layout, wording or convenience is affected while the function itself works.

The two ratings often differ. A typo in the company name on the home page has low severity but usually gets high priority because every visitor sees it. A crash in the HR department's annual export has high severity. If the next export is ten months away, its priority can still rank below other bugs.

Attaching screenshots, recordings and logs

A screenshot shows what you saw. Mark the affected area and keep the address bar visible. For defects in a flow across several pages, such as a booking process, a short screen recording is quicker to grasp than ten written steps. Keep the steps in the report anyway, because a video cannot be searched.

Logs help the team find the spot in the code. In most browsers F12 opens the developer tools, where you can copy the red entries from the console. For server logs the team needs the time of the error with its time zone and, if possible, the affected account or record ID. Before you attach anything, redact personal data such as names, addresses, salaries or health information. This matters most for HR and medical systems.

Checklist before you submit

  • The title names the symptom and the condition in about ten words.
  • The steps start from a defined state. You ran them again yourself from the beginning.
  • Expected and actual behavior are separate, the expected one with a source where possible.
  • Error messages appear word for word as text.
  • The environment lists device, browser and version, software version and environment.
  • Frequency is stated, as "x of y attempts" for intermittent bugs.
  • Severity is set and backed by one sentence.
  • The report describes observations. Any theory is labeled as such.
  • The report contains exactly one bug.
  • You searched for an existing report of the same bug.
  • Attachments are included and free of personal data.

Writing bug reports with the tool

The tool on this site turns a short description into a complete bug report. You describe what happened in your own words. The AI asks about what is still missing, such as the starting state or the browser. For each question it explains why the detail matters. It then writes the report and checks it for reproducibility, completeness and severity. Any details it filled in are listed so you can verify them. You can also paste an existing bug report to have it reviewed. Create a ticket with AI

Frequently asked questions

What is the difference between a bug and a change request?

A bug exists when the software deviates from agreed behavior or from what users can reasonably expect. If the software does what was decided and you want something different, that is a change request. Write it as a user story so the team can weigh it like any other new requirement.

Who sets the priority of a bug?

The reporter sets the severity because they observed the impact. The product owner usually decides the priority together with the team. Besides severity, the number of affected users, deadlines and the effort of the fix all play into it.

What if I cannot reproduce the bug reliably?

Report it anyway and state the frequency, for example "2 of 10 attempts." Write down everything that was different when it happened: time, network, other open windows, the data you worked with. The Bugzilla guidelines point out that a report without reproducible steps needs unique information about the occurrence to be useful.

Can I include my guess about the cause?

Yes, as long as the observation is complete and the guess is labeled. Put it at the end, under a heading like "Possible cause." A developer can then check it while the description of the defect stays intact.

How detailed should a bug report be?

Someone without background knowledge has to be able to reproduce the bug from it. Any line that does not help with that can go. Leave out history that has no bearing on reproducing the issue. Never leave out the environment or the exact error message.

What should I do if the bug has already been reported?

Before filing, search the tracker for keywords from the error message. If you find a matching report, add your observation as a comment, such as another environment or a new way to trigger the bug. A duplicate splits the information across two tickets.

Sources

Last updated: