chatgpt prompt engineering for software testing

chatgpt prompt engineering for software testing

In this article, I will explain how to use chatgpt for software testing.

While developing testcasegpt, I came across some exciting prompts on extracting the best performance out of chatgpt for software testing. I will explain them in detail.


Let's say you want to search and write test cases for login functionality. Usually, you can simply ask to write test cases in login functionality test cases, and you will get some responses. That's the most rudimentary approach.

But here in this article, I will show you some advanced prompt engineering techniques which I learned while developing testcasegpt.

Idea1: Assign a role to it

Rather than directly asking it for test cases, first, give it the following prompt

can you simulate the role of a highly intelligent quality assurance engineer?

After that, you can ask if you can write login functionality test cases. And you will have much better results with the simulation of the QE role rather than directly asking for it

Idea2: ask it to think step by step

First, ask it to write to login functionality test cases

after you have answers, then ask again, "Can you think step by step and write again, please?"

Then you can compare the difference between the results step by step and without it.

Idea3: Give requirements in a more precise manner

In this, you have to specify your requirements clearly and precisely.

Rather than simply specifying, write a login test cases functionality.

You can try the following way.

"The login function requires users to enter their username and password and includes the option to show/hide the password, a Remember me checkbox and a sign-in button. A sign-up button is also available for new users"

Follow me for more exciting updates.

Suresh Mantha

Associate Vice President | Brand Ambassador @Broadridge India | CSPO

9 个月

soma kesalu DM me if you are looking for a job change.

回复

要查看或添加评论,请登录

社区洞察

其他会员也浏览了