How ChatGPT Can Help Us in Writing Clear Bug Reports
In the software development cycle, testers are expected to spot errors in time and present them in such a way that developers can quickly understand what error has occurred. An excellent bug report should be clear and concise, but it can be time-consuming for a tester to write a bug report that is complex and complicated to explain. This is a situation where ChatGPT can be of great help.
ChatGPT can completely create us a bug report that developers will fully understand and we will not have to waste precious time on additional explanations, which a bad bug report almost always causes.
The Importance of a Good Bug Report
A bad bug report will cause a lot of back and forth communication between the tester and the developer, which takes up unnecessary time, or in the case that the developer thinks he understood the bug report, but because of the bad way it was written, he didn’t, it can lead to the potential release of the bug to production.
In order for the effect of the bug report to be maximal, each part of the report must serve its purpose, starting from the title that can at first glance present the developer with what the problem is and where it is, to the description that gives us the context of the problem, clear steps on how to reproduce the problem and finally, the expected and actual result that unequivocally tells how the system should behave and how it actually behaves.
Each bug report should contain the following:
- What happened?
- How to reproduce?
- Expected result
- Actual result
If we miss any of these, the risk of misunderstanding the bug increases.
In order for ChatGPT’s help to be complete, we must first describe the application itself in as much detail as possible, where the issue is located, at what moment it occurred, etc. The more clearly we explain from the beginning, the closer the created bug report will be to our wishes and the less we will have to ask ChatGPT to make corrections.
Here is how to do it in practice:
1. Start by describing the app. Explain its main purpose and which platform is it, native, web or mobile.
2. Write down in detail what happened, the steps to reproduce the error and the expected and actual result.
3. Specify exactly what format you want the bug report to have:
- Title,
- Description,
- Steps to reproduce,
- Expected result,
- Actual result.
After this, ChatGPT will write a bug report with a concise title that will tell the developer at a glance what it is about, it will order the steps in a list and it will use professional language instead of unclear language like “it looks weird” or similar.
In the following example, I will show how it all looks in practice:
Write me a bug report for the following case: It is an app for renting properties. When a user creates a property, there is no option to create a property with 0 bedrooms (In the case when the property is rented only for the day, without an overnight stay). To create a property, the user needs to go to the list of their properties and click the ‘Create new property` button there, after which a page with a property creation form will open.
Write me the bug report in the following format:
Title - clear and immediately states what the problem is
Description - short description of the problem
Steps to reproduce
Actual result
Expected resultOn this request, ChatGPT responded with an almost perfect bug report. The only thing I had to adjust is step 4 in the "Steps to Reproduce”. Everything else it managed to write correctly on the first try, exactly as it should.
Here’s the final version of the bug report:
Title
Unable to create a property with 0 bedrooms
Description
When creating a new property, the form does not allow selecting 0 bedrooms. This is a problem for properties that are rented only for the day (without overnight stay).
Steps to Reproduce
Log in to application
Go to the list of your properties
Click on the Create new property button
In the property creation form, click on the Bedrooms dropdown
Actual Result
The Bedrooms field only allows values starting from 1 and higher. There is no option to select 0 bedrooms.
Expected Result
The Bedrooms field should allow selecting 0 as a valid option, so that properties without overnight accommodation can be created.
This bug report clearly shows what the problem is at first glance, it is well organized and it looks like it was written by an experienced tester.
In the beginning, it can be tiring until the application is described in detail. Until we explain exactly the form of the bug report, we will certainly have to look for corrections in the first few bug reports made by ChatGPT, but over time, after a certain number of bug tickets, ChatGPT adapts to our way of writing, and later we will need much less sentences to describe the problem, and the bug ticket itself will completely meet our requirements. Eventually, we would have one or two small corrections to make.
We need to understand that ChatGPT cannot determine the context by itself and it is necessary that our input be complete and accurate. If it is not, the output itself will not be at a satisfactory level. Also, it would be good to avoid giving unclear steps such as writing “open the page” instead of “navigate to settings…” but even in that case, if we have previously made it clear in what form and in what way we want the reports to be written, ChatGPT will transform this language into a form that is more suitable for business environment.
ChatGPT is not a mind reader, it is just an excellent helper that cannot replace a tester, but it contributes by providing polish, formatted and organized bug reports that save both the tester’s and the developer’s time and keep communication within the team smooth.
You might also like reading these blog posts:
How We Grow Together at LambdaWorks
Marko Katić
Stop Wasting CI Minutes - Use Git Hooks Instead
Aleksandar Petaković