ChatGPT, a QA Companion
Zahlan Shafeer
Product Development & Management Leader | Technical Program Management | Championing Customer-Centric Innovation to Drive Growth & Excellence
AI will not replace people, but people who use AI will replace people who don’t.
This is the current mindset of leaders at large organizations like IBM, where Aravind Krishna CEO of IBM recently said in an interview that he is planning to pause or slow hiring for back-office jobs that can be done by AI.
AI has been a hot topic in the technology sector for several years now and the rise of ChatGPT and the launch of thousands of other new AI tools has really opened our eyes and shown us how powerful technology has become. However, many of us are still not utilizing AI tools for our capability and don’t understand how we can integrate AI into the way we work. I believe using AI tools will become a skill soon and it can even help you land jobs.
At OSOS we often discuss how AI tools can help us to improve our work and write code faster and effectively without losing the quality. We recently started trying GitHub Copilot which is giving us amazing results. But we haven’t discussed much how AI can help us in the QA work and in this article, I would like to share some basic GPT skills for QA engineers. I believe ChatGPT is a great tool QA engineers perhaps can use and get the most benefit out of its skills.
On a typical day, QA engineer tasks would be:
And of course, many other tasks related to improving the quality of software applications etc.
Designing Test Cases
Working as a QA engineer involves solving as many probability problems in a day which means they always strive for better test coverage. A test engineer is successful when they consider as many possibilities as possible and validate through their tests. However, it is not easy to say it, as it needs a lot of thought processing and needs to be fully focused. Therefore, having a helping hand is not a bad idea and you can use ChatGPT to get some help.
I was impressed by the result on my first try as I gave it a finance module scenario and not a typical one.
My prompt was as follows:
Input:
Write as many test cases as you can for this scenario. "As a user, I want to approve the direct invoice and once the invoice is fully approved it should post to the general ledger and AP sub-ledger"
In the first response, GPT gave me 5 test cases each one was a valid test case and ready to use.
Response:
And then I want to make it more readable and I want to add more possible test cases.
Input:
Show the result in a table and add all the possible test cases.
Response:
All right, now it is much more readable, and we can see ChatGPT is doing a great job identifying different scenarios and this kind of result can certainly accelerate the test designing process.
Test Dataset
QA engineers are responsible to create the test dataset and they spend time creating the dataset for all the possible scenarios. I tried this with ChatGPT and the response is below.
领英推荐
Input:
Provide me with the test dataset to run the above test cases.
Response:
Automation Scripts
Now I wanted to try how ChatGPT can help us on writing the automation scripts. Currently, at OSOS we are working on developing our test automation framework and we are implementing using Cucumber along with Selenium which allows test scenarios to be written using natural language.?
First, I want to try writing one test case in Gherkin format and then I tried writing the automation script.
Input:
Write the test cases in Gherkin format
Response:
You can see the response ChatGPT has given us, and it is well-written in Gherkin format. Now we want to write the automation script from Gherkin syntax.
Input:
I want to automate test case 1 in Selenium. Could you write an automation test script?
Response:
As I did not mention the language, by default it gave me the script in Python. But you mention the language and it can generate accordingly.
Now you can see, using ChatGPT can significantly improve the productivity of QA engineers and save them time. There’s a lot to be adjusted as per your need and you will still need to change and update the response of ChatGPT. However, as we have such an intelligent tool, we should make use of it and try our best to use it in the right way.
We need to learn how we can use these AI tools in the right way to improve day-to-day work as the impact of ChatGPT and other AI tools on various industries are already significant. I believe ChatGPT has a lot of potential to revolutionize the QA process and improve the quality of software products.
Please note that I have used ChatGPT 3.5, and I am sure version 4 will give you more smarter and accurate results.?
Software Quality Assurance Engineer | ISTQB-CTFL Qualified
1 年We can use ChatPGT to write codes, convert codes from one language to another, to write automation scripts and convert them. However I noticed that ChatPGT gives us only the best case scenario.
Product Owner @ OSOS | PSPO | PSM
1 年Amazing but scary