Effective software testing requires four key test case types: positive (happy path with valid inputs), negative (error handling with invalid inputs), edge cases (uncommon scenarios like special characters), and boundary cases (minimum/maximum limits). AI can generate comprehensive test cases when prompted with structured inputs including persona (e.g., senior SDET), context, objective, style, tone, audience, and response format, using methods like CO-STAR to ensure test coverage across all categories.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Types of Testing with AI | Prompts with CO-STAR (With Demo + Examples)Added:
Hello and welcome. This is going to be a very easy and very interesting session where we are going to learn how we can make use of AI and how we can generate different types of test cases for any scenario. So, whenever we want to write test cases for any scenario, any application, we should know what are the types and we should think in types.
Okay, so let's say we have a scenario to create test cases for sign up. So, here we just don't write the test cases, we think of the different types of test cases we can write and it will make our testing very strong. So, let's see what are the things we have to do. Step number one is we should focus on the positive test cases. Now, as the name suggests, these are the happy path scenario where everything is correct.
So, we are going to use all the valid email values, valid password, all the valid values for all the fields so that the user should be able to log in. So, we can try with different valid values and this will be the type positive test cases.
Then, after this we should do negative test cases and as the name suggests, this is where we are going to break the process. So, we can use the invalid values for email, password or other fields. We can make the fields empty and we can check that when we try to log in, we should not be able to log in and there should be a proper error message that we should see.
After this we have to focus on the edge cases. Now, the edge cases are some uncommon situations. So, you can think of what can go wrong and what may be some uncommon situations. For example, a user gives a very long email. Is that allowed? So, you can try that, check that, special characters, spaces, etc. So, this will make your testing even more stronger. So, all the things that user might do, so you should be able to take care of all these scenarios.
After this, we have the boundary cases. So, here we are going to test the limits. For example, the minimum and maximum characters or length allowed for all the fields and this will be the or the type edge test cases or the boundary cases.
Okay?
So, this will even make our testing much more stronger. Now, this is how we are going to think. This is an example of sign up process. So, whatever scenario you are testing, think of it in types that what can be the different types of test cases or types of scenarios I can try or I can do testing for this particular scenario and then divide those types and then write your test cases. Now, here for any good testing, we have to focus on positive, negative, edge and boundary cases and this will make your testing comprehensive.
Okay? So, after understanding that the different types we have and how we write our test cases, not just writing them, but dividing them into types and then we start writing the test cases.
How exactly we can make use of AI here?
So, in the last couple of sessions, we have learned how we can write better prompts, how we do prompt engineering and how we write prompts for our testing. So, let's make use of all those things and write a good prompt. So, we will start with persona or role prompting where we will uh say to chat AI that you are a senior SDET or a senior QA engineer, whatever is the scenario, according to that you can give a role and then we will start typing the exact requirements we have.
So, I will say generate eight test cases for sign up page including Now, here I will give the types I want, positive, negative, edge and boundary cases. Then, we will add the constraints and the structure, output in table format with all the columns that we need and we don't want any explanation, any details. We also want all these columns. So, this is a very very good prompt. We will also try it with the COSTAR method that we learned earlier, but first let us try this.
So, you can go to any chat AI chat, ChatGPT, Gemini, Claude, Blackbox, etc. And I will just copy and paste this prompt here and let's see what do we get. So, you can see we are getting the output as we need in the format we need and exactly the test cases, eight test cases with all the things we need. Okay, so this is how AI will help us a lot if we give us a good prompt. Okay? So, now how we can So, here we can we have added persona, that is role prompting, constraints, structure, all the things we have learned earlier. Let us also see how we can create the prompt using the COSTAR method. So, here again, we will start with persona, that is you are a senior SDET, and then we will add all the COSTAR terminologies, that is context, objective, style, tone, audience and response. So, this is the context that we are testing this sign up page with email and password. This is what we have. Our objective is to generate eight test cases. In the style, we will add the types, that is include positive, negative, edge and boundary cases.
We have to keep it concise. We don't want details, so the tone is concise.
Audience is tester. This is important because if we say audience is maybe some business person or a BA team, then the format and the language of the response and output may differ. Therefore, it is important. And then in the response, we are adding all these that we want a table format with all these columns and no explanation. Okay? So, let us try this as well.
So, I will go here and just paste this. This is my prompt in COSTAR format and let's see.
So, again, I'm getting a very good output with proper formatting, everything that I need and you can see it says positive, negative, boundary.
Now, I can say that I want four for positive, four for negative, four for boundary, four for edge. Whatever is the requirement, you can add in your prompt or you can make it even better. Okay, so this is how you can start and use types of testing for any scenario you are testing. I hope this was useful. I will see you soon.
Thank you for watching and never stop learning.
Related Videos
Agentforce NOW AMA: Build with React and Salesforce Multi-Framework
SalesforceDevs
490 views•2026-05-28
How agent o11y differs from traditional o11y — Phil Hetzel, Braintrust
aiDotEngineer
450 views•2026-05-28
WEB TECHNOLOGIES UNIT-2 | Degree 4th sem BCOM Computers web technologies unit-2 full explanation💯✅
LearnwithSahera
1K views•2026-05-29
More tests are always better? How to use AI to identify tests that bring little value
Alliance4Qualification
335 views•2026-05-29
Search Algorithms Explained in 60 Seconds! 🤖💨
samarthtuliofficial
218 views•2026-06-01
People of Game of Thrones using JavaScript DOM
AltCampus
296 views•2026-05-30
Introduction to Problem Solving Part - 1 | Lecture 1 | Intermediate DSA
ascensionix
107 views•2026-05-29
🚀 BCS613C Compiler Design | Module 1 to 5 Schema Evaluation 🔥 | VTU 6th Sem 💯 #VTU #bcs613c #exam
Pranavaa-y4y
104 views•2026-06-02











