# Prompt Engineering for Testing | CO-STAR Method | Write Better AI Prompts (Hands-On)

## Метаданные

- **Канал:** Automation Step by Step
- **YouTube:** https://www.youtube.com/watch?v=1hwN7unPmHs
- **Дата:** 27.04.2026
- **Длительность:** 10:57
- **Просмотры:** 4,230

## Описание

TOPICS
00:00 Introduction
00:30 What is Prompt Engineering
01:15 Basic Prompt Demo (Login Test Cases)
02:57 3 Pillars of Effective Prompting
03:51 Improved Prompt Demo (Better Output)
07:55 What to Always Ask Before Writing Prompts
08:21 CO-STAR Method Explained
10:00 Advanced Prompt Demo (Real-World Example)
----

Short - https://youtu.be/JNMpXh1Fx2c?si=PpYu3DkJ3pvOqP-0

Struggling to get good results from AI?

In this video, you’ll learn what a prompt is and how prompt engineering helps you get better, more accurate results—especially in software testing

👉 You’ll learn:

What is a prompt (simple explanation)
What is prompt engineering
Why AI gives poor output sometimes
How to write better prompts using real examples
CO-STAR Method
Step-by-step demo using ChatGPT

We’ll use real testing scenarios like login and signup to make it practical and easy to understand

👉 This is a hands-on session—learn by doing, not just watching

Perfect for beginners, testers, and anyone using AI tools

QUIZ - https://forms.gle/JNFeQEhZZaupNXtZ9

Let me know your SCORE in the comments

▬▬▬▬▬▬▬

Share with all who may need this

If my work has helped you, consider helping any animal near you, in any way you can

Never Stop Learning
Raghav Pal

prompt engineering, what is prompt, AI prompts, ChatGPT prompts, prompt engineering for beginners, AI in testing, test case generation AI, QA automation AI

▬▬▬▬ USEFUL LINKS ▬▬▬▬


✅  ALL TUTORIALS - https://AutomationStepByStep.com/


✅  CI | CD | DEVOPS

Jenkins Beginner - https://bit.ly/2MIn8EC
Jenkins Tips & Trick - https://bit.ly/2LRt6xC
Docker - https://bit.ly/2MInnzx
Jenkinsfile - https://bit.ly/3JSMSZ7
Kubernetes - http://bit.ly/2MJIlMK
Vagrant - https://bit.ly/3MVKdBt
Ansible - https://bit.ly/3MUsY3h
Terraform - https://bit.ly/4hMh3l6
CircleCI - https://bit.ly/4k1AYhw


✅  WEB TESTING 

Selenium Beginners - https://bit.ly/2MGRS8K
Selenium Java Framework from Scratch - https://bit.ly/2N9xvR6
Selenium Python - https://bit.ly/2oyMp5x
Selenium 4 - https://bit.ly/3AiJOlP
Selenium Tips - https://bit.ly/2owxc50
Selenium Builder - https://bit.ly/2MKNtlq
Katalon Studio - https://bit.ly/2wARFdi
Robot Framework with RIDE- https://bit.ly/2Px6Ue9
Robot Framework with Eclipse - http://bit.ly/2N8DZxb

Testim - https://bit.ly/3VbnNQb
TestCafe - https://bit.ly/3O6eYmK
AccelQ - https://bit.ly/3PlsAsh
Cucumber BDD - https://bit.ly/3Cnno4z
Cypress - https://bit.ly/3PpEukM
Playwright - https://bit.ly/3iuPByJ
WebdriverIO - https://bit.ly/3IJyofA
XPath & Web Locators - https://bit.ly/3PpEvoQ


✅  API TESTING 

Web Services (API) - https://bit.ly/2MGafL7
SoapUI - https://bit.ly/2MGahmd
Postman - https://bit.ly/2wz8LrW
Postman 2022 - https://bit.ly/3JWm4qX
Postman 2024 - https://bit.ly/3AE2wr6
Rest Assured - https://bit.ly/3zUdhRD
Karate API Testing - https://bit.ly/3w3H5Ku
General - https://bit.ly/2PYdwmV
JMeter API Testing - https://bit.ly/3AgVPar
Katalon Studio API Testing - https://bit.ly/2BwuCTN
API Mocking - https://bit.ly/3bYPsjS


✅  MOBILE TESTING 

Appium - https://bit.ly/2ZHFSGX
Appium 2 - https://bit.ly/3UJujNJ
Mobile Playlist - https://bit.ly/2PxpeUv


✅  PERFORMANCE TESTING

JMeter Beginner - https://bit.ly/2oBbtIU
JMeter Intermediate - https://bit.ly/2oziNVB
JMeter Advanced - https://bit.ly/2Q22Y6a
JMeter Tips & Tricks - https://bit.ly/2NOfWD2
Gatling - https://bit.ly/3QrWfkV
Performance Testing - https://bit.ly/2wEXbLS
k6 - http://bit.ly/3LOSJUN


✅  SOURCE CODE MANAGEMENT

Git & GitHub - https://bit.ly/2Q1pagY
GITLAB - http://bit.ly/2kQPGyQ


✅  IDE 

Eclipse - https://bit.ly/3AnRhQP
IntelliJ IDEA - https://bit.ly/3AnyDZ8
Visual Studio Code - https://bit.ly/2V15yvt


✅  PROGRAMMING

Java Beginners - https://bit.ly/2PVUcXs
Java Tips & Tricks - https://bit.ly/2CdcDnJ
Groovy - https://bit.ly/2FvWV5C
JavaScript - http://bit.ly/2KJDZ8o
TypeScript - https://bit.ly/3dvJBmz
Python - http://bit.ly/2Z4iRye
Ruby - https://bit.ly/3JRRmzf


✅  BUILD TOOLS

Maven - https://bit.ly/2NJdDRS
Gradle - http://bit.ly/30l3h1B


✅  CLOUD SERVICES 

Browserstack - https://bit.ly/3w7kxZn
Saucelabs - https://bit.ly/3w7kAo1
LambdaTest - https://bit.ly/3C6TBwM


✅  PROJECT MANAGEMENT 

Jira - https://bit.ly/3AFzE1L


✅  DATA FORMATS 

JSON - https://bit.ly/3w450tq
XML - https://bit.ly/3PqRneH


✅  OTHERS

Virtualization on Windows  - http://bit.ly/2SItIL9
Mock Interviews - https://bit.ly/3QGwwVJ

Redis - https://bit.ly/2N9jyCG
Misc - https://bit.ly/2Q2q5xQ
Tools & Tips - https://bit.ly/2oBfwoR
QnA Friday - https://bit.ly/2NgwGpw
Sunday Special - https://bit.ly/2wB23BO



🙌 Connect with Raghav:

* Ask Raghav: https://bit.ly/2CoJGWf
* GitHub: https://github.com/Raghav-Pal
* Udemy: https://www.udemy.com/user/raghav-pal-3/



Shorts Eng - https://bit.ly/3H9bifV
Shorts Hindi - https://bit.ly/3XY7XqN

➡️ Subscribe for more videos: https://www.youtube.com/@RaghavPal

—
#PromptEngineering #AITesting #ChatGPT #AIforBeginners

## Содержание

### [0:00](https://www.youtube.com/watch?v=1hwN7unPmHs) Introduction

Hello and welcome. I'm Raghav. In this session, we are going to go very basic step-by-step and we will learn what's prompt engineering, how do we use prompt engineering for testing, and we will learn the Co-Star method using which you can make your prompt very, very clear and effective, and you can make use of AI very, very efficiently for your jobs. This is going to be very easy and very interesting. We will understand each concept and go step-by-step, and you can also take the quiz after this session. Let's get started and see what's prompt

### [0:30](https://www.youtube.com/watch?v=1hwN7unPmHs&t=30s) What is Prompt Engineering

engineering. So, prompt engineering is the way, the art, or the science by which you communicate with AI effectively. So, you can communicate with AI in any ways. You can just write a simple question and you will get some output, but it will be very generic, very vague, and if you really want the best possible outputs and the best possible use of AI, you need to learn prompt engineering by which you can give more clarity and ask specific and very good questions and so that you can get effective replies from AI. So, let's say if you say, "What uh if you say write test cases for login to AI? " It will generate the output. Let me

### [1:15](https://www.youtube.com/watch?v=1hwN7unPmHs&t=75s) Basic Prompt Demo (Login Test Cases)

go to Chat GPT. You can go to any AI tool, Chat GPT or let's say Gemini or whatever you're using. If I say, "Write test cases for login and hit enter. " And it will give you the output. It will tell you all the functional test cases, whatever are the different scenarios. It will try to cover everything, but still it is very vague, very generic, and not specific to what you need, not specific to your application or your project requirements. Instead of this, if you say, "Generate five positive and five negative test cases for login and you don't need any explanation, you just need the exact test cases. " You can also add that add five test cases for positive scenarios, five for negative, and five for edge. So, this is a better prompt, more clearer, and you can get better responses here. Still, if you go ahead and say, "Generate five BDD test case scenarios for login with email validation and password rules in a table format. " So, now it is more clear. You have said what exactly you need, what are the constraints, and what format do you need your test cases in. Okay, so this is how you will you can improve your prompt, and we will learn this is still very basic. We will learn how exactly you can write very, very good prompts for AI. So, a prompt is any question, any instruction, anything that you ask AI, that is a prompt. And we have to learn how to ask or make our prompts better. Okay, with this knowledge, let's go and see. So, we know what's prompt engineering and we have discussed few prompts. Now, the three main pillars of

### [2:57](https://www.youtube.com/watch?v=1hwN7unPmHs&t=177s) 3 Pillars of Effective Prompting

prompts is clarity. It should be very clear. If you tell AI what exactly you need, what is the format, what is your use, what is your need, you will get much better responses. You can provide the context like why, where, which platform, where exactly you want to run it, what application you are using, etc. And if there are any constraints like you need only this particular structure, you need in a table format, you need to use only this particular language, all these boundaries or constraints. So, clarity, context, and constraints. So, whenever you are designing your question, you just think of these things that what exactly you need, and then what is the context, where exactly you are going to use it, and what are the constraints or boundaries. Now, you can design your prompts according to this, or you can ask AI itself that this is what I need, and according to this, tell me what should I ask. For example

### [3:51](https://www.youtube.com/watch?v=1hwN7unPmHs&t=231s) Improved Prompt Demo (Better Output)

I will go here and say, "I want I want to create test cases for login scenario. I am using a mobile app, or I am testing a mobile app. I want five positive, five negative, and five edge cases in table format. Create a good prompt that I can ask AI to get best possible response or output. So, I have said this and I will hit enter and let's see what prompt it will give us. So, you can see it is actually creating our prompt, and here it is a well-crafted prompt, and you can see here. Now, here it is saying act as a QA engineer. So, this is called role prompting. We will also learn about this in the coming sessions that you can actually do role prompting. You can say act as a QA engineer, act as uh S-shaped, act as a automation engineer, and then do this. So, here with strong experience in mobile application testing, create five test cases for a mobile app, and these are the things you need. It is very clear. Then the requirements presented in a clear table format, include all these columns. Now, you can also update it whatever else you need, and it should be realistic, include validation checks, error handling, security, etc. Context, the login requires a username, email, and password. Now, if you have OTP or other login options, you can add it here, and then all the output format, etc. So, see if I just copy this and paste it here, or even if I go to Gemini and paste it here, and let's see what do we get as a output of this prompt. Now, you have understood within few seconds how we have improved our prompts, and you can now see the output. How clear, effective, and useful output we are getting. Okay, everything that we need, everything is presented within few seconds. If I go and check here, if I go to Chat GPT, here again, I will get all these different test cases formatted in table with all the details, and I just have to check them and use them. Of course, with AI, you always have to review and then check and then use. Do not blindly uh rely on it. And you can see how much difference it makes. Okay? So, this is all about how do you communicate effectively with AI so that you get the best possible responses and outcomes. Okay, now let's see prompt engineering for testing, how you can actually use it for testing. We have already seen that this is you can say write test cases for login, which is very generic and give you very vague output. And here, what all we are missing is the clarity, the constraints, the exact what exactly you need to do. The context is not there. The type, limit, format, etc. We are not giving anything. Therefore, we have to improve it using keywords. So, we can say, "Generate what exactly we need, positive, negative, and edge test cases, limit to five for each category, no explanation needed. " You can say that I need a table format, and then you can get much better outputs that we have already seen. Okay? You can ask AI itself how you can improve the prompt as we have done just now, and you will get much, much better outputs. All right.

### [7:55](https://www.youtube.com/watch?v=1hwN7unPmHs&t=475s) What to Always Ask Before Writing Prompts

Now, always be very clear, give the context, and the constraints. What do you need? What is the context? What is the platform you are using? What format do you need? Are there any limits? For example, you want to not use some particular language or some particular format, all that things. And then you can ask AI to improve your prompts, and then use those prompt to get the output.

### [8:21](https://www.youtube.com/watch?v=1hwN7unPmHs&t=501s) CO-STAR Method Explained

Let's see the Co-Star method. So, what's the Co-Star method for prompting? So, let's say the basic prompt is write test cases for a Avoid this. This is very basic. This will not give you efficient responses. Use the Co-Star method. What's that? C stands for context. You can say, "I'm testing a web application for a high security banking portal. " Or whatever is your need exactly, you can say that in the context. The objective. What is your objective? Now, you have given you have told AI that what is the context. Now, you are saying that what exactly you want. Generate a comprehensive test plan for the login module. Okay, so you would you imagine AI is a machine. It will not know exactly what is you what do you need unless you tell it very, very clearly. So, you have told the context, objective. Then, S stands for style. What style do you want? What format do you want? Then, T stands for tone. Critical and security focused is the tone it should use or the output it should use. Audience, QA team lead. So, for which audience you are getting the response generated. So, this makes a huge difference whether it's for a QA team lead, business people, it will make a huge difference in the outputs. Then, R stands for that it the response. Here, you can say what exactly you need. Provide a list of functional, negative, security test cases, edge test cases that you need, and what all things you want to add, include, or exclude, all that you can add in this response. Okay, let's try to use this. I just

### [10:00](https://www.youtube.com/watch?v=1hwN7unPmHs&t=600s) Advanced Prompt Demo (Real-World Example)

copied it and I will paste it here. So, you can see this is what I have pasted. Exactly what we discussed and I am hitting enter and you will see it will it becomes very easy for the AI also. It will use less energy, less power because we have given all the details, the context, what exactly we need, the clarity is there, context is there, constraints are there and it makes it very easy for AI and it will be it will give you better and faster responses and you can directly use them and check them and then use them for your needs. Okay? So, this is how you can use prompts and make your prompts better and this is how we will learn prompt engineering for testing. I hope this was very useful. I will see you soon. Thank you for watching and never stop learning.

---
*Источник: https://ekstraktznaniy.ru/video/50059*