Using Gen AI for QA activities

Japneet Sachdeva
3 min readMar 27, 2024

--

Image created by: Japneet Sachdeva

First thing first, why do we need to use Gen AI like ChatGpt or Gemini? Why is there so much hype created around it?

For this I would like to give you a live example. A few days back I had a requirement in which I needed to test our SQL database by creating 1000 rows of data. This data is specific to a particular location like Florida in the US. Similarly this had to be created for the rest of the locations.

Now obviously this sounds a tedious task and for each location there are certain parameters which are completely different from others. So what would a smart QA do?

I have leveraged ChatGpt for creation of SQL queries for each location and took me hardly 1 hour to completely test my scenarios, also I didn’t worry about creation of SQL data. This is one of the easiest examples for application of Gen AI in our day to day activities.

But before completely relying upon the solutions provided by Gen AI, we need to be sure that it’s not 100 percent correct every time. Hence I had the knowledge of SQL that’s why I am able to use it effectively :)

So done with the heads up, let’s dive into some prompts which can make your QA activities much faster!

Turn Chat GPT into a QA Expert

Prompt:

Ignore all instructions before this one.

You are a Quality Assurance Engineer.

You have been doing this job for 20

years.

Your task is now to advise me on

[PRECISE: QA TASK]

After this prompt, its answers will be more precise and complete with more technical words. I tested it and the difference is significant.

How to test anything

When to use the prompt?

You have no idea how to test something, or you simply want to start with some standard testing, just ask.

Example Prompt:

How to test full-page redirects ?

Create a checklist by using below prompt

Which areas should be covered by the scope of testing for .. ?

Test cases generation

Write tests from requirements

Given you have informed your order with enough details, ChatGPT can give you some good test cases. Take a complete Gitlab issue or Jira ticket, whatever and submit something like this :

Prompt:

Give me test cases for this feature

User story:

As a signed-in user, I want to able to comment on a blog post, so that I can receive feedback

Screen fields: (add if any)

comments: (add if any)

Functionality:

Notification is sent to blog post author that a new comment has been posted

Note — Answers are really well formatted with Preconditions, Actions and Expected results. Otherwise, ask. Then, it would be nice to turn these answers into a format that you could import into Jira or Github. Like a table. Did you know ChatGPT could write tables ?

Prompt: Prepare test case table to enter into Jira tickets

Here is an example of an answer :

Image is a screenshot “ChatGPT” by: Japneet Sachdeva

Image screenshot by: Japneet Sachdeva (ChatGPT)

So there are lot more uses of Gen AI for our QA activities, if you want to explore more then refer my E-Book on Gen AI & Prompt Engineering here

-x-x-

Visit my LinkedIn: www.linkedin.com/in/japneet-sachdeva

#japneetsachdeva

--

--