Write Better Bug Reports with AI: Clear Steps and Evidence

A developer cannot fix a bug that they cannot understand. AI is very good at turning rough notes into clear language, but it must never add facts you did not see. In this lesson you will write better bug reports with AI and keep every detail true.

📖 What You’ll Learn

  • What a useful bug report contains
  • How to turn rough notes into a clear report
  • The difference between severity and priority
  • How to stop AI from inventing details

💡 What Makes a Bug Report Useful?

Explain Like I’m 5: Bug Report

Imagine: You tell a parent, “My toy broke when I dropped it on the stairs. Here it is.” They know what happened and can help.

What it really means: A bug report explains what happened, how to repeat it and why it matters.

In testing: Clear steps let a developer see the same problem.

FieldWhat it should contain
TitleProblem and location in one line
EnvironmentBuild, browser, device and test system
PreconditionsWhat must be true before starting
StepsExact numbered actions
Expected resultWhat should happen, based on a requirement
Actual resultWhat really happened
EvidenceScreenshot, video, log or trace
Severity and priorityImpact and urgency

🔍 How to Write Bug Reports with AI

Explain Like I’m 5: Tidying Your Notes

Imagine: You give a teacher a messy story. The teacher fixes the spelling, but the story stays yours.

What it really means: AI should improve the writing and leave the facts alone.

In testing: It can organise your notes without adding new steps.

Your rough notes might look like this:

cart page. added 2 items. changed qty of first item to 0. total didnt
change, item still there. chrome. build 4.2. no error shown.

From those notes, AI can produce a structured report. Look closely at what it adds. If your notes do not say what should happen at quantity 0, the AI does not know either. Check the requirement.


🧩 A Good Result

Title: Cart: setting item quantity to 0 does not update the total or remove the item

Environment: Build 4.2, Chrome, test environment

Steps:

  1. Add two different items to the cart.
  2. Open the cart page.
  3. Change the first item’s quantity to 0.

Expected result: [Confirm from the requirement]

Actual result: The item stays in the cart, the total does not change, and no error is shown.

Keep the blank

Do not let AI guess the expected result. A clear “[Confirm from the requirement]” is far better than a confident guess.


🛠️ Severity and Priority

Explain Like I’m 5: Severity and Priority

Imagine: A broken bed is a big problem. A broken party balloon is small, but it matters a lot if the party starts in ten minutes.

What it really means: Severity is how bad the problem is. Priority is how soon to fix it.

In testing: A logo typo has low severity, yet can be urgent on launch day.

AI can suggest values, but you and your team know the real business impact. Follow your team’s definitions.


📌 How to Keep the Report True

  1. Check every step by repeating it yourself.
  2. Remove any detail you did not observe.
  3. Confirm that the expected result comes from a real source.
  4. Attach your own evidence.
  5. Remove secrets and personal data from logs and screenshots.

The AI cannot prove a root cause

It is fine to write “Possible cause”. Do not state a cause as fact unless someone has confirmed it. See Log Analysis with AI to investigate safely.


🧪 Try It Yourself

  1. Find or imagine a small issue on the Automation Practice Page.
  2. Write rough notes, just as you would during testing.
  3. Run the prompt below.
  4. Compare the report with your notes, line by line.
  5. Delete anything that your notes do not support.

📋 Ready-to-Copy Prompt

You are a QA engineer. Turn my rough notes into a clear bug report.

Team format: Title, Environment, Preconditions, Steps, Expected Result,
Actual Result, Evidence, Suggested Severity, Suggested Priority, Open
Questions.

Rules:
- Use only the facts in my notes. Do not add steps or details.
- If a field is not in the notes, write "[TO CONFIRM]".
- Do not guess the expected result or the root cause.
- Keep the title under 100 characters.
- Give a one-sentence reason for each suggested rating.

My notes:
[paste notes with no real customer data or secrets]

⚠️ Common Mistakes

  • Leaving AI-invented steps in a report
  • Writing a title such as “Cart not working”
  • Stating a guessed root cause as fact
  • Copying severity from AI without using team definitions
  • Pasting logs containing tokens or customer data

🎯 Key Takeaways

  • A useful report lets another person see the same problem.
  • AI should improve clarity, and you keep the facts.
  • Mark missing information instead of guessing.
  • Severity and priority are different decisions.

🎤 Interview Questions

1. What makes a good bug report?

Model answer: A good report has a specific title, environment details, exact steps, expected and actual results, evidence and a clear severity. Another person should be able to reproduce the problem without asking for more information.

2. What is the difference between severity and priority?

Model answer: Severity describes the impact of the defect on the system or user. Priority describes how soon it should be fixed. A spelling mistake on a launch page can be low severity but high priority.

3. How do you use AI when writing bug reports?

Model answer: I give it safe, factual notes and ask it to use my team’s format. I forbid invented details, mark missing fields and then verify every line. It saves time on wording, but I stay responsible for accuracy.

4. What would you do if a developer cannot reproduce your bug?

Model answer: I would first retest it and review the environment, build and data. Then I would share more evidence, such as a video or logs, and try to work through it together. I would also look for timing or data conditions.

5. Should AI suggest the root cause in a bug report?

Model answer: It can suggest possible causes for investigation, but they must be clearly labelled. Unconfirmed causes can mislead developers. I report the observed behaviour and evidence, then let the investigation confirm the cause.


📝 Assignment

Take three rough sets of notes, and turn each one into a bug report using the prompt. Highlight anything the AI added that was not in your notes. Then improve the prompt so that those additions stop.


❓ FAQ

Can AI write the bug report from a screenshot?

Some tools can read images, but they may misread what they see. Your own observations remain the source of truth.

Should I report every small issue?

Follow your team’s process. Small issues can be grouped when that is acceptable, so developers get useful reports without extra noise.


🚀 Next Steps

Well done on finishing this lesson. Complete the assignment, then continue with Log Analysis with AI: Read Logs and Stack Traces as a Tester.

Exploratory Testing with AI: Better Charters and Test Ideas

Exploratory testing depends on human curiosity, and AI cannot use your product the way you can. It can still help before and after a session. In this lesson you will learn exploratory testing with AI: writing focused charters, getting fresh test ideas and turning rough notes into a clear report.

📖 What You’ll Learn

  • What exploratory testing really is
  • How to write a focused test charter
  • How heuristics give you more ideas
  • Where AI helps and where you lead

💡 What Is Exploratory Testing?

Explain Like I’m 5: Exploratory Testing

Imagine: You explore a new playground. You try the slide, notice a loose step, then check the other steps too.

What it really means: You learn, design and run tests at the same time.

In testing: Each discovery shapes your next test.

Exploratory testing is not random clicking. It has a goal, a time limit and notes. It is especially good at finding problems that scripted tests never thought to check.


🔍 How to Use Exploratory Testing with AI

StageHow AI helpsWhat you do
BeforeSuggests risks, charters and test ideasChoose what matters
DuringAnswers quick questionsUse the product and follow your instincts
AfterOrganises notes into a reportConfirm every finding

🧩 Write a Focused Test Charter

Explain Like I’m 5: Test Charter

Imagine: “Go and look for red shells on the beach for ten minutes.” You know where to go, what to find and when to stop.

What it really means: A charter is a short mission for one testing session.

In testing: It names the area, the method and what you want to learn.

A simple charter format is:

Explore [area] with [tools, data or method] to discover [information].

Examples:

  • Explore the checkout with an expired session to discover how cart data is handled.
  • Explore the search filters with unusual characters to discover display or error problems.
  • Explore the transfer form on a slow network to discover duplicate submissions.

Keep sessions short, such as 45 to 60 minutes. A narrow charter finds more than “test the whole site”.


🛠️ Use Heuristics to Find More Ideas

Explain Like I’m 5: Heuristics

Imagine: When you lose a toy, you check under the bed, in the toy box and behind the sofa. Those are good places to look first.

What it really means: A heuristic is a helpful rule of thumb for finding ideas.

In testing: It reminds you to try empty fields, huge values and sudden interruptions.

Try these simple heuristics:

HeuristicTry this
GoldilocksToo small, too big and just right
InterruptRefresh, go back or lose the network mid-action
RepeatDouble-click, resubmit and retry
RolesUse the same feature as different users
OrderDo the steps in an unexpected order

🌍 Real-Life Example: Testing a Money Transfer

A tester asks AI for risk ideas on a transfer form and receives eight suggestions. The tester picks two: duplicate submission and session timeout.

During the session, the tester notices that the confirmation button stays active for a moment after it is clicked. AI never saw this. The tester follows that clue, double-clicks on a slow connection and finds a duplicate transfer. The AI supplied a starting point. The human found the bug.

Protect your attention

Do not keep switching to a chat window during a session. Note your questions, and use AI when you pause.


🔑 Turn Notes into a Session Report

Take short notes as you test. Afterwards, AI can organise them into a report. Make sure your notes contain only safe data.

A useful report includes the charter, time spent, what you tested, bugs found, open questions and ideas for later sessions.


🧪 Try It Yourself

  1. Choose an area on the Dummy E-commerce Website.
  2. Use the prompt below to get three charter ideas.
  3. Pick one, and test for 30 minutes.
  4. Write down what you try, see and wonder about.
  5. Ask AI to organise your notes, then correct anything it changed.

📋 Ready-to-Copy Prompt

You are an experienced exploratory tester.

Feature: [describe the feature]
Users: [who uses it]
Recent changes or known risks: [details]

Suggest 5 exploratory test charters using this format:
Explore [area] with [method or data] to discover [information].

For each charter, give the risk it targets, 3 first test ideas and a
suggested length in minutes. Rank them by likely business impact.

Rules:
- Base them on the details above.
- Do not claim that any defect exists.
- List any information that would improve your suggestions.

⚠️ Common Mistakes

  • Treating exploratory testing as random clicking
  • Writing a charter that is too broad
  • Running AI’s test ideas like a script and ignoring surprises
  • Forgetting to take notes
  • Reporting AI-written findings that you did not observe

🎯 Key Takeaways

  • Exploratory testing combines learning, test design and execution.
  • A charter gives each session a clear mission.
  • Heuristics help you think of new ideas.
  • AI helps before and after, while you lead the session.

🎤 Interview Questions

1. What is exploratory testing?

Model answer: It is testing where learning, test design and execution happen together. The tester uses each result to decide what to try next. It is structured with a goal, a time limit and notes, so it is not random.

2. What is a test charter?

Model answer: A charter is a short mission for a test session. It describes the area to explore, the method or data, and the information to discover. It keeps the session focused while leaving room for investigation.

3. What is session-based test management?

Model answer: It organises exploratory work into time-boxed sessions with charters and reports. This makes the work easier to plan, review and report while preserving the tester’s freedom.

4. How can AI support exploratory testing?

Model answer: It can suggest risks and charters, offer test ideas and organise session notes. I decide which ideas are worthwhile and investigate the product myself. Any bug in my report must be one I actually observed.

5. Can AI replace exploratory testing?

Model answer: AI agents can explore applications and find some issues. But they lack full business context and human judgment about what feels wrong to a user. I see AI as useful support, with a tester directing the work and judging the results.


📝 Assignment

Run two 30-minute sessions on the same feature, one with a charter you wrote and one with an AI-suggested charter. Compare what each found. Write a short session report for each, and use it to practise writing clear bug reports.


❓ FAQ

How is exploratory testing different from ad hoc testing?

Ad hoc testing is informal and usually undocumented. Exploratory testing also adapts as you learn, but it has a mission, a time limit and notes.

Can I do exploratory testing without knowing how to code?

Yes. Curiosity, product knowledge and careful observation are the core skills.


🚀 Next Steps

Well done on finishing this lesson. Complete the assignment, then continue with Write Better Bug Reports with AI: Clear Steps and Evidence.

Synthetic Test Data with AI: Create Safe, Realistic Data

Good tests need good data, and real customer data is not safe to use freely. In this lesson you will create synthetic test data with AI, including valid, invalid and boundary records. You will also learn the checks that stop bad data from causing false test failures.

📖 What You’ll Learn

  • What synthetic data is and why it matters
  • How to describe the data you need
  • How to create valid, invalid and boundary records
  • How to validate AI-generated data

💡 What Is Synthetic Test Data?

Explain Like I’m 5: Synthetic Data

Imagine: Toy money looks like real money, so you can play shop. Nobody can spend it in a real shop.

What it really means: Synthetic data looks real, but it is invented and belongs to nobody.

In testing: A made-up customer lets you test sign-up without using a real person’s details.

Testing with real data can expose personal information. Synthetic data lets you test freely, share results and create rare situations on demand.


🔍 How to Ask for Synthetic Test Data with AI

Explain Like I’m 5: Describing Data

Imagine: If you ask for “some blocks”, you may get any colour. If you ask for “ten red square blocks”, you get what you need.

What it really means: Define every field, format and rule.

In testing: State the date format, allowed values and how many records you need.

Include these details in your prompt:

DetailExample
Fieldsname, email, date_of_birth, country
FormatDates as YYYY-MM-DD
Allowed valuescountry must be IN, US or UK
RulesUser must be 18 or older
Mix5 valid, 3 invalid and 2 boundary
OutputJSON or CSV

🧩 Three Kinds of Test Data

  • Valid: follows every rule and should be accepted
  • Invalid: breaks one rule and should be rejected
  • Boundary: sits at the edge of a limit

Change only one thing in each invalid record. If a record has three problems, you cannot tell which one caused the error.


🌍 Real-Life Example: Sign-Up Records

Here is sample output for a sign-up form. Every value is made up.

[
  { "id": "U1", "name": "Asha Test", "email": "asha.test@example.com", "age": 30, "scenario": "valid" },
  { "id": "U2", "name": "Ravi Test", "email": "ravi.test.example.com", "age": 30, "scenario": "invalid: missing @" },
  { "id": "U3", "name": "Mira Test", "email": "mira.test@example.com", "age": 17, "scenario": "boundary: below minimum" },
  { "id": "U4", "name": "Dev Test", "email": "dev.test@example.com", "age": 18, "scenario": "boundary: at minimum" }
]

Use example.com for email addresses. That domain is reserved for documentation, so test messages will not reach a real person.

Payment details need special care

Never create card numbers that might be real. Use the test card numbers published by your payment provider, and only in its test mode.


📌 Keeping Related Data Connected

Explain Like I’m 5: Connected Data

Imagine: A shoe needs its matching pair. If you mix up the pairs, nothing fits.

What it really means: Linked records must agree with each other.

In testing: Every order must belong to a customer who exists.

If orders refer to customers, ask for both sets together. Then confirm that every customer_id in the orders exists in the customers list. AI often breaks these links in larger data sets.


🔑 How to Validate the Data

Bad data creates false failures, so check it before you use it.

  1. Check the format. Parse the JSON or open the CSV in a spreadsheet.
  2. Count the records. Did you get the number and mix you asked for?
  3. Apply the rules. Is every “valid” record really valid?
  4. Check for duplicates. Are unique fields actually unique?
  5. Check the links. Do all IDs match?
  6. Check for real data. Remove anything that looks like a real person or company.

For large sets, ask AI to write a small script that generates the data, then review and run it yourself. A script gives repeatable results, while a chat answer can change every time.


🧪 Try It Yourself

  1. Think of a form on the Dummy Banking Website.
  2. Write its fields and two rules, using your own made-up details.
  3. Run the prompt below.
  4. Check the output using the six steps above.
  5. Use your data on the site, and note any record that behaves unexpectedly.

📋 Ready-to-Copy Prompt

You are a QA test data specialist. Create synthetic test data.

Fields and formats:
[list each field and its format]

Business rules:
[list the rules]

Create [number] valid, [number] invalid and [number] boundary records.

Rules:
- All data must be clearly fake. Do not use real people or companies.
- Use only example.com for email addresses.
- Each invalid record must break exactly one rule.
- Add a "scenario" field that says what the record tests.
- Return valid JSON only.

⚠️ Common Mistakes

  • Using production data because it is convenient
  • Breaking several rules in one invalid record
  • Assuming the data is correct without validating it
  • Generating numbers that could be real cards or accounts
  • Losing the links between related records

🎯 Key Takeaways

  • Synthetic data is realistic and belongs to nobody.
  • Define fields, formats, rules and the mix you need.
  • Each invalid record should break only one rule.
  • Validate the data before using it, because bad data creates false failures.

🎤 Interview Questions

1. What is synthetic test data?

Model answer: It is artificial data that looks realistic but does not belong to a real person. It lets a team test realistic scenarios without exposing personal information, and it can be created for rare cases.

2. Why should an invalid test record break only one rule?

Model answer: If a record breaks one rule, a failure points clearly to that rule. With several problems, the system may report only the first, so the other validations would remain untested.

3. How do you maintain referential integrity in generated data?

Model answer: I generate related data together and use clear IDs. I then verify that every foreign key points to an existing record. A short validation script or SQL query can check this reliably.

4. How do you check AI-generated test data?

Model answer: I validate the format, count the records, test each one against the rules, check uniqueness and links, and look for anything real. I also run it through the application to find incorrect assumptions.

5. Why might you ask AI for a data-generation script instead of the data?

Model answer: A script is repeatable, can create large volumes and can be reviewed and versioned. Chat answers may vary each time. I still review the script and validate what it produces.


📝 Assignment

Create a linked data set of 5 customers and 10 orders. Include at least two invalid orders and one boundary case. Check every link yourself. The SQL Tutorial can help you write a query to verify those links.


❓ FAQ

Is synthetic data always safe?

Check it anyway, as generated values can look like real people by chance. Clearly fake names and reserved domains lower that risk.

Can AI help me mask production data?

Do not paste production data into an AI tool to mask it. Use approved in-house tools, as covered in AI Data Privacy for Testers.


🚀 Next Steps

Well done on finishing this lesson. Complete the assignment, then continue with Exploratory Testing with AI: Better Charters and Test Ideas.

Test Design Techniques with AI: Boundaries, Tables and States

Ask AI for “test cases” and you often get a random list. Ask it to apply a named technique and the result becomes far more complete and easier to check. In this lesson you will use four classic test design techniques with AI: equivalence classes, boundary values, decision tables and state transitions.

📖 What You’ll Learn

  • Four test design techniques in plain language
  • How to choose the right technique for a feature
  • How to ask AI to apply each one
  • How to check that the output is complete

💡 Why Use Test Design Techniques with AI?

Techniques give both you and the AI a clear method. You can also check the result, because each technique has rules. If you know the rules, you can spot a missing test straight away.


🔍 Equivalence Classes

Explain Like I’m 5: Equivalence Classes

Imagine: You sort sweets by colour. You only taste one red sweet, because the other red ones should be the same.

What it really means: Group inputs that should behave alike, and test one from each group.

In testing: For ages 18 to 60, test one valid age and one from each invalid group.

Rule: an age field accepts 18 to 60.

GroupExample valueExpected
Below the range10Rejected
Inside the range35Accepted
Above the range75Rejected

🧩 Boundary Values

Explain Like I’m 5: Boundary Values

Imagine: A ride says you must be as tall as the line. The arguments happen with children right at the line.

What it really means: Bugs often hide at the edges of a range.

In testing: Test just below, on and just above each limit.

For the same rule, test 17, 18, 60 and 61. These four values catch common mistakes, such as a developer writing “greater than 18” instead of “18 or more”.


🛠️ Decision Tables

Explain Like I’m 5: Decision Tables

Imagine: “If it is sunny and you finished your homework, you can play outside.” Each mix of answers gives one result.

What it really means: A decision table lists every combination of conditions and its result.

In testing: Use it when several rules work together.

Rule: members who spend more than 1,000 get a discount of 10%. Everyone else gets no discount.

RuleMember?Order above 1,000?Discount
1YesYes10%
2YesNoNone
3NoYesNone
4NoNoNone

With two yes-or-no conditions, there are four combinations. With three, there are eight. Ask the AI to show its count, so you can confirm that nothing is missing.


📌 State Transitions

Explain Like I’m 5: State Transitions

Imagine: A traffic light goes from green to yellow to red. It should not jump from red straight to yellow in most places.

What it really means: Some things move through set stages, and only certain moves are allowed.

In testing: Test allowed moves and blocked moves.

Example: an order can move from Placed to Shipped to Delivered. A Placed order can also be Cancelled.

FromActionToAllowed?
PlacedShipShippedYes
PlacedCancelCancelledYes
ShippedDeliverDeliveredYes
DeliveredCancelDeliveredNo

Blocked moves are often forgotten, so ask for them by name.


🔑 Choosing the Right Technique

Feature has…Start with
Input fields with groups of valuesEquivalence classes
Numeric, date or length limitsBoundary values
Several rules that combineDecision table
Statuses or a workflowState transitions

Most real features need more than one. The ISTQB Foundation guide covers these techniques in more depth.

Do the small version first

Work out one technique by hand before you ask AI. You can only judge an answer that you understand.


🧪 Try It Yourself

  1. Use this rule: a coupon works for orders from 500 to 5,000, for logged-in users only.
  2. Write the boundary values and combinations yourself.
  3. Run the prompt below.
  4. Check for 499, 500, 5,000 and 5,001.
  5. Check that logged-in and guest users are both covered. Then try another rule from the Automation Practice Page.

📋 Ready-to-Copy Prompt

You are a QA engineer skilled in test design techniques.

Business rules:
[paste rules]

Apply these techniques in order:
1. Equivalence classes for each input
2. Boundary values for each limit
3. A decision table for combined rules, stating the total combinations
4. State transitions if the feature has statuses, including blocked moves

For each test, show ID, Technique, Input or Condition, Expected Result
and the Rule it comes from.

Rules:
- Use only the business rules above.
- If an expected result is not defined, write "NEEDS CONFIRMATION".
- Do not merge techniques or skip one without saying why.

⚠️ Common Mistakes

  • Asking for “all test cases” without naming a technique
  • Testing only the limit and not the values on each side
  • Forgetting blocked state changes
  • Not counting the combinations in a decision table
  • Trusting expected results that the rules do not support

🎯 Key Takeaways

  • Named techniques make AI output more complete and easier to check.
  • Equivalence classes reduce repeated tests.
  • Boundary values target the edges where bugs often hide.
  • Decision tables and state transitions handle rules and workflows.

🎤 Interview Questions

1. What is equivalence partitioning?

Model answer: It divides input data into groups that the system should treat the same way, then tests a representative from each group. This reduces repeated tests while still covering valid and invalid behaviour.

2. Give boundary values for a field that accepts 1 to 100.

Model answer: I would test 0, 1, 100 and 101. Some teams add 2 and 99 for three-value boundary analysis. The main purpose is to check behaviour just outside and exactly at the limits.

3. When would you use a decision table?

Model answer: I use one when an outcome depends on combinations of conditions, such as discounts or eligibility rules. It shows every combination clearly and exposes cases that the requirements do not define.

4. What is state transition testing?

Model answer: It tests how a system moves between states in response to events. I cover valid transitions and also invalid ones, such as trying to cancel an order that has already been delivered.

5. How do you use AI with test design techniques?

Model answer: I name the technique and give the rules, then ask it to show its working, such as the number of combinations. I verify the boundaries and expected results myself, because it can skip cases or invent behaviour.


📝 Assignment

Pick a feature with at least one limit and two combined rules. Create boundary tests and a decision table by hand, then use the prompt. Record any test that you missed and any test the AI missed.


❓ FAQ

Do I need to test every combination?

For a small table, yes. Large numbers of combinations need a risk-based choice or methods such as pairwise testing, which later lessons can build on.

Are these techniques still useful with AI?

Yes, even more so. They give you a clear way to direct the AI and judge what it produces.


🚀 Next Steps

Well done on finishing this lesson. Complete the assignment, then continue with Synthetic Test Data with AI: Create Safe, Realistic Data.

Create a Test Plan with AI: A Practical Guide for Testers

A blank test plan template can take hours to fill in. AI can give you a useful first draft in minutes, if you supply the right facts. In this lesson you will create a test plan with AI, understand how it differs from a test strategy, and learn which decisions must stay with you.

📖 What You’ll Learn

  • The difference between a test plan and a test strategy
  • Which project facts to give the AI
  • The sections a useful test plan needs
  • Which parts you must always review yourself

💡 Test Plan vs Test Strategy

Explain Like I’m 5: Plan and Strategy

Imagine: Your family’s rule is “always wear seat belts”. That is the strategy. Today’s route to Grandma’s house is the plan.

What it really means: A strategy is the overall approach. A plan applies it to one release or project.

In testing: The strategy says we test by risk. The plan lists this release’s risks.

PointTest strategyTest plan
ScopeTeam or product wideOne project, release or feature
ChangesSlowlyOften
AnswersHow do we usually test?What are we testing now?

🔍 How to Create a Test Plan with AI

Explain Like I’m 5: Facts for the AI

Imagine: You cannot pack a bag if nobody tells you where you are going.

What it really means: AI needs real project facts to write a useful plan.

In testing: Share features, dates, environments, people and known risks.

Give the AI this information:

  • What is changing: features, fixes and integrations
  • Who uses it: user types and important journeys
  • Environments: browsers, devices and test systems
  • Timeline and people: dates and available testers
  • Known risks: past defects and fragile areas

🧩 Sections of a Useful Test Plan

SectionThe question it answers
ObjectiveWhy are we testing this?
In scopeWhat will we test?
Out of scopeWhat will we not test, and why?
ApproachWhich test types will we use?
Environments and dataWhere and with what data?
Roles and scheduleWho does what, and when?
Risks and mitigationsWhat could go wrong?
Entry and exit criteriaWhen do we start and stop?
DeliverablesWhat will we produce?

Out of scope is a real decision

Stating what you will not test protects everyone. AI cannot make that decision, because it depends on your risk, time and stakeholders.


🛠️ What You Must Decide Yourself

Explain Like I’m 5: The Driver Decides

Imagine: A map app can suggest a road. The driver still looks out of the window and decides.

What it really means: AI can propose a plan, but people are responsible for its decisions.

In testing: You choose priorities, exit criteria and what to skip.

Review these parts with extra care:

  1. Priorities: does the order match business risk?
  2. Exit criteria: can they actually be measured?
  3. Estimates: AI does not know your team’s speed.
  4. Dependencies: are named systems and dates real?
  5. Risks: add what you learned from past releases.

🌍 Real-Life Example: Adding a New Payment Method

A team adds a digital wallet at checkout. A weak prompt would be “Write a test plan for payments.” The result would be generic.

A stronger prompt names the feature, the existing card payment flow, the supported browsers and the five working days available. It also states that refunds were a problem in the last release. The AI can now place refund testing near the top, as that risk came from you.


🔑 Exit Criteria That Work

Vague exit criteria cause arguments at release time. Compare these examples. The numbers are examples only, and your team must set its own.

VagueMeasurable
“Most tests pass”All planned P1 tests are executed and passed
“Few bugs remain”No open Critical or High defects
“Good coverage”Every approved requirement has at least one executed test

🧪 Try It Yourself

  1. Choose a feature on the Dummy Booking Website.
  2. Make up a release date, two testers and one known risk.
  3. Run the prompt below.
  4. Mark every sentence that came from your facts, and every one that is an assumption.
  5. Rewrite the out-of-scope and exit criteria sections yourself.

📋 Ready-to-Copy Prompt

You are a senior QA lead. Draft a test plan using only the facts below.

Feature or release: [what is changing]
Users and key journeys: [users and journeys]
Environments: [browsers, devices, systems]
Timeline and team: [dates and testers]
Known risks and past defects: [risks]

Include these sections: Objective, In Scope, Out of Scope, Approach,
Environments and Data, Roles and Schedule, Risks and Mitigations,
Entry Criteria, Exit Criteria and Deliverables.

Rules:
- Do not invent systems, dates, people or numbers.
- Write "[TO CONFIRM]" wherever a fact is missing.
- Rank risks by likely business impact and explain why.
- Keep the plan under two pages.

⚠️ Common Mistakes

  • Copying the AI’s plan without changing it
  • Leaving made-up dates or environments in the document
  • Setting exit criteria that nobody can measure
  • Making a long plan that nobody will read
  • Forgetting to update the plan when scope changes

🎯 Key Takeaways

  • A strategy is the general approach, and a plan applies it to one release.
  • Real project facts produce useful plans.
  • Mark missing facts instead of letting the AI guess.
  • You own scope, priority, estimates and exit criteria.

🎤 Interview Questions

1. What is the difference between a test plan and a test strategy?

Model answer: A test strategy describes the general testing approach for a product or organisation and changes slowly. A test plan applies that approach to a specific project or release, with its scope, schedule, people and risks.

2. How would you use AI to create a test plan?

Model answer: I would give it the scope, users, environments, timeline and known risks, and ask it to mark missing facts. Then I would review the priorities, estimates and exit criteria with the team before using it.

3. What are entry and exit criteria?

Model answer: Entry criteria are the conditions needed to begin testing, such as a stable build and test data. Exit criteria are measurable conditions for finishing, such as executed priority tests and no open critical defects.

4. What should a test plan say about out-of-scope items?

Model answer: It should list what will not be tested and briefly explain why. This sets clear expectations, makes the risk visible and lets stakeholders challenge the decision early.

5. What is the risk of using an AI-generated test plan without review?

Model answer: It may include invented systems, unrealistic estimates or generic priorities. Because it reads well, those errors can pass unnoticed and mislead the team. I verify every factual statement and adapt the priorities to real risk.


📝 Assignment

Create a one-page test plan for a small feature using the prompt. Highlight every “[TO CONFIRM]”, and resolve each one yourself using made-up team answers. Then ask a friend whether they can tell what is in scope and when testing ends.


❓ FAQ

How long should a test plan be?

Only as long as it needs to be. Many agile teams prefer a short, living document that people will really read.

Can AI estimate my testing effort?

It can suggest a rough structure, but it does not know your system or team. Use your own history, and try risk-based testing to focus limited time.


🚀 Next Steps

Well done on finishing this lesson. Complete the assignment, then continue with Test Design Techniques with AI: Boundaries, Tables and States.

Review User Stories with AI: Find Gaps in Acceptance Criteria

The cheapest bug is the one you catch before anyone writes code. In this lesson you will learn to review user stories with AI, find gaps in acceptance criteria and turn them into clear questions for your team. This is one of the fastest ways for a tester to add value.

📖 What You’ll Learn

  • What makes a user story easy or hard to test
  • Five kinds of gaps to look for
  • How to ask AI for a useful story review
  • How to turn findings into good team questions

💡 Why Review a Story Before Testing?

Explain Like I’m 5: Story Review

Imagine: Before a treasure hunt, you read the map. If the last step is missing, you ask for help before you start digging.

What it really means: Reviewing a story finds missing details before work begins.

In testing: A small question today can stop a large defect later.

A user story describes what a user wants and why. Acceptance criteria are the conditions that must be true for the story to be accepted. Together, they tell the team what “done” means.


🔍 How to Review User Stories with AI

Explain Like I’m 5: AI Story Review

Imagine: A friend reads your homework and asks, “What does this word mean?” The friend helps you see what is unclear.

What it really means: AI can point out vague wording and possible gaps.

In testing: It can ask what “quickly” means in a performance rule.

AI is good at spotting unclear language. It does not know your product decisions, so treat every finding as a question to check.


🧩 Five Kinds of Gaps

Gap typeExample in a storyQuestion to ask
Vague words“The page loads quickly”How many seconds is acceptable?
Missing errorsNo failure message is definedWhat does the user see if it fails?
Missing limits“User can upload a file”Which types and what maximum size?
Missing roles“User can delete a report”Which roles are allowed?
Missing statesNo rule for an expired sessionWhat happens when the session ends?

🌍 Real-Life Example: Saving a Delivery Address

User story: As a shopper, I want to save my delivery address so that checkout is faster.

Acceptance criteria: The user can add an address. The user can choose a saved address at checkout.

A careful review could raise these questions:

  • How many addresses can one shopper save?
  • Which fields are required, and what format does the postal code need?
  • Can a shopper edit or delete an address?
  • What happens to an order if its address is later deleted?
  • Do guest shoppers get this feature?

Notice that these are questions, and not new requirements. Only the team can decide the answers.


📌 Good Questions Get Good Answers

Explain Like I’m 5: Asking Good Questions

Imagine: “Is it fun?” is hard to answer. “Can we play outside after lunch?” is easy.

What it really means: A good question is specific and easy to answer.

In testing: Offer options, such as “Should the limit be 5 or 10 addresses?”

Group your questions by priority. Raise the ones that block testing first, and remove anything already answered. Your product owner will thank you for a short, focused list.

Check for conflicts too

Ask whether two criteria disagree. AI can miss conflicts across many stories, so review related stories together, and read them yourself.


🧪 Try It Yourself

  1. Pick a feature on the Dummy E-commerce Website.
  2. Write a short user story and two acceptance criteria for it.
  3. Write your own list of questions first.
  4. Run the prompt below in a new chat.
  5. Compare the lists, and keep only the questions that really matter.

📋 Ready-to-Copy Prompt

You are a senior QA engineer reviewing a user story before development.

User story:
[paste user story]

Acceptance criteria:
[paste acceptance criteria]

Review it for vague wording, missing error handling, missing limits,
missing roles and missing states.

Return a table with: Gap Type, Quote from the Story, Why It Matters,
Question for the Product Owner, Priority (High, Medium or Low).

Rules:
- Do not invent requirements or answers.
- Base each finding on the text above.
- If the story is clear on a point, do not raise it.

⚠️ Common Mistakes

  • Treating AI’s questions as confirmed requirements
  • Sending a long unfiltered list to your product owner
  • Reviewing one story and ignoring related stories
  • Pasting confidential requirements into an unapproved tool
  • Waiting until test execution to ask questions

🎯 Key Takeaways

  • Finding a gap before coding is cheaper than finding a bug later.
  • Look for vague words, missing errors, limits, roles and states.
  • AI raises questions, and your team supplies the answers.
  • A short, prioritised list gets better responses.

🎤 Interview Questions

1. How can AI help with requirement analysis?

Model answer: AI can find vague wording, missing error handling, limits and roles, then suggest questions. I give it the story and criteria, review its findings, and take only the relevant questions to the product owner. It supports the analysis, but it cannot decide business rules.

2. What makes acceptance criteria testable?

Model answer: They need clear, observable outcomes with defined conditions and limits. “The page loads quickly” is not testable, while “search results appear within 2 seconds for a defined load” can be measured.

3. What would you do if a requirement is ambiguous?

Model answer: I would write a specific question, explain the risk and suggest possible options. I would raise it early with the product owner and record the decision, so that development and testing share one understanding.

4. What are the limits of using AI to review requirements?

Model answer: It lacks product history and domain decisions, and it can miss contradictions across many stories. It may also raise irrelevant points. I treat its output as a checklist of possible issues and verify each one myself.

5. What is shift-left testing?

Model answer: Shift-left means starting quality activities earlier in development. Reviewing stories before coding is a good example, because it finds misunderstandings when they are still cheap to fix.


📝 Assignment

Choose three user stories, real or made up, with no confidential details. Review each by yourself and then with AI. Record how many useful questions each approach found, and note one question that only you thought of.


❓ FAQ

Can AI write the acceptance criteria too?

It can draft them, but your product owner must confirm them. A draft is useful only after someone who knows the product has approved it.

Do I need the whole requirements document?

Share only the part that is relevant and approved for your AI tool. Follow the rules from AI Data Privacy for Testers.


🚀 Next Steps

Well done on finishing this lesson. Complete the assignment, then continue with Create a Test Plan with AI: A Practical Guide for Testers.

Build Your QA Prompt Library: Save and Reuse Prompts That Work

If you keep rewriting the same prompts, you are doing the same work twice. A QA prompt library is a simple collection of prompts that have already proved useful. In this final lesson of Level 2, you will build your own and learn how to keep it trustworthy.

📖 What You’ll Learn

  • What a prompt library is and why it saves time
  • What to record for each prompt
  • How to use placeholders and version numbers
  • How to test and share prompts safely

💡 What Is a QA Prompt Library?

Explain Like I’m 5: Prompt Library

Imagine: A family recipe book keeps the best meals. You do not have to invent dinner again every night.

What it really means: A prompt library is a saved set of prompts that have worked well.

In testing: Keep one tested prompt each for scenarios, bug reports and log analysis.

Your library can be a simple document, a spreadsheet or a Git repository. Start with whatever you will really use.


🔍 What to Save for Each Prompt

Explain Like I’m 5: Prompt Details

Imagine: A good recipe card shows the name, the ingredients, the steps and a note saying, “Do not overcook.”

What it really means: Save the prompt along with the facts that make it easy to reuse.

In testing: Record its purpose, inputs, version and known weak spots.

FieldWhy it helpsExample
NameMakes it easy to findBoundary scenarios from a rule
PurposeSays when to use itFinding limits in numeric rules
Prompt textThe reusable instructionsWith placeholders
Inputs neededWhat you must supplyRules and field limits
VersionShows how it changed1.2
Tested withShows where it workedTool, model and date
Known limitsWarns the next userWeak for date and time rules

🧩 Use Placeholders

Explain Like I’m 5: Placeholders

Imagine: A birthday card says, “Dear ____.” You write a new name each time, but the card stays the same.

What it really means: A placeholder is a blank that you fill in each time.

In testing: [feature name] and [business rules] make one prompt reusable.

Use square brackets so that blanks are easy to see. Before sending a prompt, check that no blanks remain.


🛠️ A Simple Folder Structure

Organise prompts by testing activity. Then you can find them when you need them.

ai-qa-toolkit/
  prompt-library/
    01-requirements/
      find-requirement-gaps.md
    02-test-design/
      scenarios-from-rules.md
      few-shot-test-cases.md
    03-test-data/
      synthetic-users.md
    04-bugs-and-logs/
      bug-report-from-notes.md
    05-review/
      review-ai-test-cases.md
    README.md

If you know Git, you can track every change to your prompts. Our Git and GitHub Tutorial can teach you how.


📌 A Reusable Prompt Card

Copy this template into a new file for each prompt.

Name: Boundary scenarios from a rule
Version: 1.0
Purpose: Create boundary scenarios for fields with numeric limits
Inputs needed: Field name, minimum, maximum, business rule
Tested with: [tool and model], [date]
Known limits: Not tested on date or time rules

PROMPT
You are a QA engineer. Create boundary scenarios for this field.

Field: [field name]
Minimum: [minimum]
Maximum: [maximum]
Rule: [business rule]

Return a table with ID, Value, Reason and Expected Result.
Test values just below, on and just above each limit.
Use only the rule above. List anything unclear as a question.

🔑 How to Test a Prompt Before Saving It

Treat a prompt like a small test asset. A prompt is ready for your library after it passes these checks:

  1. Run it on two or three different features. One good result may be luck.
  2. Run it more than once. Remember that AI answers can change.
  3. Use the review checks from How to Review AI-Generated Test Cases.
  4. Record the limits that you discover.

Models change

A prompt that works today may behave differently after a model update. Retest your most important prompts from time to time, and record the date.


💡 Sharing Prompts with Your Team

A shared library helps everyone avoid repeating work. Agree on a few simple rules:

  • Follow one common prompt card format.
  • Have a teammate review each new prompt.
  • Give each prompt a named owner.
  • Remove prompts that nobody uses.

Keep the library clean

Never save real customer data, credentials, tokens or confidential requirements in a prompt. Use placeholders, and follow your AI data privacy rules.


🔍 Five Prompts to Start With

You already have these from this course:

PromptUseFrom
Five-part scenario promptTest scenariosLesson 6
Few-shot format promptTeam-style test casesLesson 7
Step 1 of the prompt chainExtract the rulesLesson 8
Gherkin promptBDD scenariosLesson 9
Strict reviewer promptSecond-opinion reviewLesson 10

🧪 Try It Yourself

  1. Open the ai-qa-toolkit folder from Lesson 5.
  2. Create the folder structure shown above.
  3. Add the five prompts from the table, each as a prompt card.
  4. Use the prompt below to tidy up one of your own prompts.
  5. Test the improved version on two features, and fill in “Tested with”.

📋 Ready-to-Copy Prompt

You are helping me improve a reusable QA prompt.

Here is my current prompt:
[paste your prompt, with no real data]

Please:
1. Replace any project-specific details with [placeholders].
2. Point out any missing role, context, task, constraints or format.
3. Add this rule if it is missing: "Use only the information provided.
   List anything unclear as questions."
4. Return the improved prompt, then list what you changed and why.
Do not change the purpose of the prompt.

⚠️ Common Mistakes

  • Saving every prompt, including ones that never worked
  • Having no notes about when a prompt should be used
  • Keeping real project data inside saved prompts
  • Never retesting prompts after a model update
  • Building a huge library that is too hard to search

🎯 Key Takeaways

  • A QA prompt library saves time and makes results more consistent.
  • Save each prompt with its purpose, inputs, version and limits.
  • Test a prompt several times before you trust it.
  • Keep your library free of real data, and review it regularly.

🎤 Interview Questions

1. What is a prompt library?

Model answer: A prompt library is a managed collection of tested, reusable prompts. For a QA team, it can cover requirement review, test design, test data, bug reports and log analysis. It reduces repeated work and makes results more consistent.

2. How would you maintain prompts for a QA team?

Model answer: I would store them in a shared place, ideally under version control. Each prompt would have an owner, a purpose, a version, test notes and known limits. New prompts would be peer reviewed, and unused ones would be removed.

3. How do you test a prompt?

Model answer: I run it on several features and more than once, then evaluate the output against clear review criteria. For important prompts, I keep a small set of known inputs so that I can compare results after a change or a model update.

4. What should never be stored in a shared prompt?

Model answer: Credentials, tokens, customer data and confidential requirements should never be stored there. I use placeholders instead, so that the prompt can be reused safely.

5. How would you measure whether a prompt is useful?

Model answer: I would track how much of the output is accepted after review, how much editing it needs and how much time it saves against a baseline. I would also check whether it finds useful scenarios, not only how quickly it produces text.


📝 Assignment

Build a library with at least five tested prompt cards. Have a colleague or friend use one card without your help, and note where they got stuck. Improve that card and increase its version number. This completes Level 2.


❓ FAQ

Should I use a ready-made prompt collection from the internet?

They can give you good ideas. Read them first, adapt them to your work and test them before you trust them.

Where should I keep a personal prompt library?

A simple folder or private Git repository works well. Just follow your company’s rules if a prompt relates to work.


🚀 Next Steps

Well done on finishing this lesson. Complete the assignment, then continue with Review User Stories with AI: Find Gaps in Acceptance Criteria.

How to Review AI-Generated Test Cases: A Beginner’s Guide

AI can write 50 test cases in under a minute. Checking them is now the important job. In this lesson you will learn how to review AI-generated test cases with three simple checks, then practise on a test set containing planted mistakes.

📖 What You’ll Learn

  • The three problems to look for in AI test cases
  • How to find missing coverage
  • How to find invented behaviour and wrong results
  • How to give feedback that improves the next answer

💡 How to Review AI-Generated Test Cases: Three Questions

Explain Like I’m 5: Reviewing AI Test Cases

Imagine: You check a packed school bag three ways. What is missing? What does not belong? What is broken?

What it really means: Look for gaps, invented content and wrong results.

In testing: Missing boundary cases, made-up rules and wrong expected results.

CheckThe questionCommon example
GapsWhat is missing?No boundary or role-based scenarios
Invented contentWhat was never asked for?A rule that is not in the requirement
Wrong resultsWhat is incorrect?An expected result that breaks a rule

🔍 Before You Read the AI’s Answer

Explain Like I’m 5: Make Your Own List First

Imagine: Before opening a lunchbox, guess what should be inside. Then you notice right away if the sandwich is missing.

What it really means: Think of key scenarios yourself before reading the AI’s answer.

In testing: Your own short list stops the AI from shaping your thinking.

Spend two minutes writing the top risks and scenarios you expect. A long, tidy AI answer can make you feel that everything is covered. Your own list protects you from that feeling.


🧩 Check 1: Find the Gaps

Use the test design techniques you already know. The ISTQB Foundation guide explains them if you need a refresher.

  • Boundaries: values just below, on and just above each limit
  • Negative paths: invalid, empty and unexpected input
  • Roles: what different kinds of user can and cannot do
  • States: actions on locked, expired or already-used items
  • Failures: timeouts, retries and duplicate requests

🛠️ Check 2: Remove Invented Content

Explain Like I’m 5: Invented Content

Imagine: You ask for a story about a cat. A dragon appears, and nobody asked for one.

What it really means: The AI added something that your requirement never mentioned.

In testing: A test expects an OTP, but the story never mentions OTP.

Trace each test case back to its requirement. If you cannot find a source, do not simply delete it. Ask whether it is an invention or a real gap in the requirement. Sometimes the AI has raised a sensible question.


📌 Check 3: Verify the Expected Results

This is the most important check. For every expected result, ask three things:

  1. Does it match the business rule exactly?
  2. Can a tester actually observe it?
  3. Is it specific? “It works correctly” is not an expected result.

Calculate any numbers yourself. Do not trust the arithmetic in AI output.


🔑 Also Check Duplicates and Priority

AI often writes the same test in different words. Merge those cases. Then check that the priority reflects real business risk. A typing error and a failed money transfer should not both be “High”.


💡 Practice: Find the Planted Mistakes

Requirement: A customer can transfer money between their own accounts. The minimum per transfer is 100. The maximum per transfer is 50,000. The source and destination accounts must be different.

Below is an AI-style answer with mistakes planted in it. Try to find the problems before you read the answer key.

IDScenarioAmountExpected Result
TC1Transfer the minimum amount100Transfer succeeds
TC2Transfer above the maximum50,001Transfer succeeds
TC3Transfer with a valid amount5,000OTP is sent and the transfer succeeds
TC4Transfer a mid-range amount1,000Transfer works correctly
TC5Transfer one thousand between accounts1,000Transfer succeeds

Answer Key

FindingTypeFix
TC2 should be rejectedWrong resultExpect an error and no money moved
TC3 adds an OTPInvented contentRemove it, or ask the product owner
TC4 says “works correctly”Weak resultState the updated balances
TC5 repeats TC4DuplicateMerge them
No test below 100, such as 99GapAdd a boundary test
No test at exactly 50,000GapAdd a boundary test
No same-account testGapAdd a negative test

Did you catch all seven?

Finding the wrong result and the missing boundaries takes practice. The more you review, the faster you will spot them.


🔍 Give Better Feedback to the AI

You can use your review to improve the next answer. Be specific, and quote the original rule.

Please correct the test cases using this review.
1. TC2: A transfer above 50,000 must be rejected. Correct the
   expected result.
2. TC3: Remove the OTP step. It is not in the requirement.
3. Add boundary tests for 99 and 50,000.
4. Add a negative test where both accounts are the same.
Use only the requirement text. Do not add any new rules.

Review the corrected version too. New answers can contain new mistakes.


🧪 Try It Yourself

  1. Choose a feature from the Dummy Banking Website.
  2. Write your own list of the top 5 scenarios first.
  3. Ask an AI assistant for 10 test cases, using made-up rules.
  4. Run the prompt below in a new chat for a second opinion.
  5. Do your own review, then compare your findings with the AI’s.

📋 Ready-to-Copy Prompt

Act as a strict QA reviewer. Review these test cases against the
requirement. Do not rewrite them.

Return a table with these columns:
Test Case ID, Problem Type, Evidence from Requirement, Suggested Fix

Problem types: Wrong Result, Invented Content, Duplicate, Weak Result.

After the table, list missing scenarios under "Gaps". Cover boundary,
negative, role and state-based cases.
If the requirement does not answer something, list it under
"Questions". Do not invent product behaviour.

Requirement:
[paste requirement]

Test cases:
[paste test cases]

An AI review is only a second opinion. It can miss problems, and it can report problems that do not exist. You make the final decision.


⚠️ Common Mistakes

  • Reading the AI’s list before forming your own view
  • Judging test cases by how many there are
  • Approving test cases because they are neatly formatted
  • Deleting every unsupported item without asking why it appeared
  • Accepting vague results such as “works as expected”

🎯 Key Takeaways

  • Look for gaps, invented content and wrong results.
  • Write your own short risk list before reading the AI’s answer.
  • Expected results deserve the closest attention.
  • Clear, specific feedback improves the next AI answer.

🎤 Interview Questions

1. How do you review AI-generated test cases?

Model answer: I first write down my own key risks. Then I check for gaps, trace each case to the requirement to catch invented content, and verify every expected result against the business rules. I also remove duplicates and check the priorities.

2. What is the most dangerous mistake in AI-generated test cases?

Model answer: A wrong expected result is especially dangerous because it can make a defect look like correct behaviour. If automated, that test may pass and hide the problem. That is why I verify expected results carefully.

3. What would you do if AI generated a test for a rule not in the requirement?

Model answer: I would not include it as an approved test yet. I would decide whether it was invented or whether it exposes a real gap. If it might be important, I would ask the product owner to confirm the expected behaviour.

4. How do you find coverage gaps in AI output?

Model answer: I apply techniques such as boundary value analysis and equivalence partitioning, and I look at roles, states and failure paths. I also compare the output with my own risk list and map tests back to each requirement.

5. Can you use AI to review AI-generated test cases?

Model answer: Yes, as a second opinion, ideally in a separate chat with the requirement included. It can suggest issues, but it can also miss some or be wrong. I use its findings as input and make the final decision myself.


📝 Assignment

Ask AI for 15 test cases for a feature with at least three rules. Review them using the three checks, and log every finding by type. Calculate what percentage of the AI’s cases you accepted without changes. Keep this number, because measuring acceptance will matter again in later levels.


❓ FAQ

How long should a review take?

It depends on the risk of the feature. A payment flow deserves a careful review. Time spent here is still worthwhile because it prevents wrong tests from entering your suite.

Should I fix test cases myself or ask the AI?

For one or two small fixes, it is usually quicker to edit them yourself. For repeated issues, give the AI specific feedback and improve your prompt.


🚀 Next Steps

Well done on finishing this lesson. Complete the assignment, then continue with Build Your QA Prompt Library: Save and Reuse Prompts That Work.

Gherkin Test Cases with AI: Get Tables, JSON and CSV Output

A long paragraph from AI is hard to review and even harder to import. You can ask for exactly the layout you need. This lesson shows how to create Gherkin test cases with AI, and how to get clean tables, JSON and CSV for your daily QA work.

📖 What You’ll Learn

  • What structured output means
  • When to choose a table, Gherkin, JSON or CSV
  • How to ask for each format clearly
  • How to check the output before you use it

💡 What Is Structured Output?

Explain Like I’m 5: Structured Output

Imagine: Toys thrown in a pile are hard to find. Toys sorted into labelled boxes are easy to find.

What it really means: Structured output is an answer arranged in a fixed, predictable layout.

In testing: Every test case has the same fields in the same order.


🔍 Choosing the Right Format

Explain Like I’m 5: Choosing a Format

Imagine: You use a cup for juice, a plate for toast and a bowl for soup. Each one suits the food.

What it really means: Each format suits a different job.

In testing: Use a table for people to read, and JSON for programs to read.

FormatWhat it looks likeBest for
TableRows and columnsReading and reviewing test cases
GherkinGiven, When, Then sentencesBDD scenarios that a whole team can read
JSONNamed fields in curly bracketsTest data, API bodies and later automation
CSVPlain text with commasSpreadsheets and bulk import

Our examples use a shopping cart with one rule: quantity must be between 1 and 10.


🧩 Tables: Easy to Review

Name your columns in the exact order you want.

Return a Markdown table with these columns in this order:
ID, Scenario, Test Data, Expected Result, Type.
Do not add any text before or after the table.

🛠️ Gherkin: Scenarios Everyone Can Read

Explain Like I’m 5: Gherkin

Imagine: “Given I have a ball. When I kick it. Then it rolls.” It is a tiny story with a start, an action and a result.

What it really means: Gherkin writes behaviour in plain sentences using Given, When and Then.

In testing: Product owners, developers and testers can all read the same scenario.

Feature: Shopping cart quantity

  Scenario: Accept the highest allowed quantity
    Given a product is on the cart page
    When the shopper sets the quantity to 10
    Then the cart accepts the quantity

  Scenario: Reject a quantity above the limit
    Given a product is on the cart page
    When the shopper sets the quantity to 11
    Then an error message is shown
    And the quantity is not updated

Ask the AI to describe behaviour rather than clicks. “When the shopper sets the quantity” stays useful even if the button changes.


📌 JSON: Ready for Programs

JSON uses names and values. You will use it often for test data and API work.

{
  "feature": "Shopping cart quantity",
  "testData": [
    { "id": "QTY-001", "quantity": 1, "expected": "accepted", "type": "boundary" },
    { "id": "QTY-002", "quantity": 0, "expected": "rejected", "type": "boundary" },
    { "id": "QTY-003", "quantity": 10, "expected": "accepted", "type": "boundary" },
    { "id": "QTY-004", "quantity": 11, "expected": "rejected", "type": "boundary" }
  ]
}

Tell the AI to “return valid JSON only”. Then check it with a JSON validator or a code editor, because AI can still make syntax mistakes.


🔑 CSV: Ready for Spreadsheets and Import

CSV separates values with commas. If a value contains a comma, it must be wrapped in double quotes.

ID,Scenario,Quantity,Expected Result
QTY-001,Lowest allowed quantity,1,"Quantity accepted, cart updated"
QTY-002,Below the lowest quantity,0,"Error shown, cart unchanged"

Check your tool’s import rules first

Jira, Xray, Zephyr and TestRail do not all expect the same columns. Export a sample from your own tool or read its current import guide. Then give those exact column names to the AI.


💡 How to Check Structured Output

  1. Count the fields. Does every row have the same columns?
  2. Validate the syntax. Open the JSON in a validator or the CSV in a spreadsheet.
  3. Check the content. Correct formatting does not mean correct testing.
  4. Test a small import. Try one or two rows before you import many.

Tidy is not the same as true

A perfect table can still contain a wrong expected result. Review the content with the checklist from AI Hallucinations in Software Testing.


🧪 Try It Yourself

  1. Pick one rule from the Dummy E-commerce Website, or use the cart rule above.
  2. Run the prompt below, and read the Gherkin output.
  3. Ask the AI to convert the same scenarios into JSON.
  4. Paste the JSON into a validator and note any errors.
  5. Ask for CSV, then open it in a spreadsheet and check the columns.

📋 Ready-to-Copy Prompt

You are a QA engineer who writes clear BDD scenarios.

Feature: [feature name]
Rules:
- [rule 1]
- [rule 2]

Write Gherkin scenarios covering the positive, negative and boundary
cases for these rules.

Output rules:
- Use only Feature, Scenario, Given, When, Then and And.
- Describe behaviour, not button clicks.
- Use one behaviour per scenario.
- Use only the rules above. Do not invent any behaviour.
- Put anything unclear in a list called "Questions" after the scenarios.

⚠️ Common Mistakes

  • Not naming the columns you need
  • Assuming AI-generated JSON is always valid
  • Forgetting double quotes around CSV values that contain commas
  • Importing hundreds of rows before testing a small sample
  • Writing Gherkin as a long list of clicks

🎯 Key Takeaways

  • Structured output has a fixed layout that is easy to review and reuse.
  • Use tables for review, Gherkin for shared behaviour, JSON for programs and CSV for import.
  • Always validate the syntax, then review the content.
  • Match the exact import format of your own test tool.

🎤 Interview Questions

1. Why would you ask AI for structured output?

Model answer: Structured output is consistent, so it is faster to review and easier to use in other tools. I specify the exact columns or fields, then validate the format and review the testing content.

2. What is Gherkin, and what do Given, When and Then mean?

Model answer: Gherkin is a plain-language format for describing behaviour. Given sets the starting state, When describes the action or event, and Then describes the expected outcome. Tools such as Cucumber can link these steps to automation code.

3. How do you check AI-generated JSON?

Model answer: First I check that it parses in a validator or code editor. Then I check the field names and data types against the expected schema. Finally, I confirm that the values and expected results match the requirement.

4. How would you prepare AI-generated test cases for import into a test tool?

Model answer: I would get the tool’s required columns from its import guide or a sample export, and give those to the AI. After reviewing the content, I would import a small sample first to confirm the mapping.

5. What is the difference between a well-formatted and a correct test case?

Model answer: A well-formatted test case follows the agreed structure. A correct test case checks the right behaviour with the right expected result. AI can do the first perfectly and still fail the second, so I review both.


📝 Assignment

Take one feature and create its test set in all four formats: table, Gherkin, JSON and CSV. Validate the JSON and open the CSV in a spreadsheet. Write three lines explaining which format you would use for review, for your test tool and for automation.


❓ FAQ

Should I use Gherkin for every test?

No. Gherkin works best when a team uses it to agree on behaviour. A simple table or checklist may be better for routine checks.

Can I test JSON output with Playwright later?

Yes. JSON test data works very well with automated tests. You can learn the basics in the Playwright with TypeScript course.


🚀 Next Steps

Well done on finishing this lesson. Complete the assignment, then continue with How to Review AI-Generated Test Cases: A Beginner’s Guide.

Prompt Chaining for Test Cases: From Requirement to Test Suite

One giant prompt often gives one giant, messy answer. Good testers do not jump straight from a requirement to final test cases. They read, question, plan and then write. Prompt chaining for test cases follows the same natural order, one small step at a time.

📖 What You’ll Learn

  • What a prompt chain is
  • Why small steps beat one huge prompt
  • A four-step chain from requirement to test cases
  • Where a human must stop and check the work

💡 What Is Prompt Chaining?

Explain Like I’m 5: Prompt Chaining

Imagine: You do not build a sandcastle in one move. First you fill the bucket. Then you flip it. Then you add the towers.

What it really means: You split a big job into small prompts. Each answer feeds the next prompt.

In testing: Find the gaps first, then plan scenarios, then write test cases.

A prompt chain is a series of prompts where the output of one step becomes the input of the next. You can review and correct the work between steps.


🔍 Why Small Steps Work Better

Explain Like I’m 5: Checking Each Step

Imagine: While baking, you taste the batter first. If it is too salty, you fix it before it goes in the oven.

What it really means: You can catch a mistake early, before later steps build on it.

In testing: Fix a wrong assumption before it spreads to 30 test cases.

One big promptA prompt chain
Hard to see where it went wrongEach step can be checked
A wrong assumption spreads everywhereMistakes are caught early
May skip clarifying questionsQuestions become a planned step
One long answer to reviewSmall answers to review

🧩 The Four-Step QA Prompt Chain

Explain Like I’m 5: Four-Step Chain

Imagine: To plan a picnic, you ask who is coming, list what to bring, choose the food, and then pack the basket.

What it really means: Each step has one job, and they happen in a sensible order.

In testing: Understand, question, plan, write.

StepGoalHuman check
1. UnderstandTurn the requirement into a clear list of rulesIs every rule correct?
2. QuestionFind gaps, conflicts and assumptionsGet real answers from the team
3. PlanList scenarios and their riskIs anything important missing?
4. WriteCreate detailed test casesReview the final test cases

Step 2 is where the value is

Take the questions to your product owner or developer. Do not ask the AI to answer them. It does not know what your business decided.


🌍 Real-Life Example: Hotel Booking Cancellation

Here is the requirement used in this chain:

Guests can cancel a booking for free up to 48 hours before check-in. After that, one night’s charge applies. Non-refundable bookings cannot be cancelled online.

Step 1: Understand

You are a senior QA engineer. Read the requirement below.
List each business rule as a separate numbered item with the ID R1,
R2 and so on. Do not add any rules of your own.

Requirement:
[paste requirement]

Step 2: Question

Here are the approved rules:
[paste the rules you checked in Step 1]

List anything that is unclear, missing or in conflict. Write each one
as a question for the product owner. Do not answer the questions.

For this requirement, good questions could be: Which time zone applies? Does exactly 48 hours count as free? How much is one night’s charge when room prices vary by night?

Step 3: Plan

Here are the approved rules and the answers from the product owner:
[paste rules and answers]

Create a test scenario list. For each scenario, give an ID, a one-line
description, the rule ID it covers, its type (Positive, Negative or
Boundary) and its risk (High, Medium or Low).
Use only the information above.

Step 4: Write

Here are the approved scenarios:
[paste the scenarios you reviewed]

Write full test cases for the High risk scenarios only.
For each one, give ID, Rule ID, Preconditions, Steps, Test Data and
Expected Result. If an expected result is not supported by the rules,
write "NEEDS CONFIRMATION" and do not guess.

Because every test case carries a rule ID, you can see which rule it covers. This link between a rule and its tests is called traceability.


📌 Keeping a Chain on Track

  • Paste only the reviewed output into the next step.
  • Start a fresh chat if a conversation becomes very long, as you learned in How LLMs Work.
  • Keep each step’s prompt saved, so you can reuse the whole chain.
  • Stop when a step needs a business decision. Get the answer first.

🔑 When a Chain Is Too Much

A chain takes more time than a single prompt. Use one for important or complex features, such as payments. A small text change usually needs just one prompt built with the 5-part QA prompt formula.


🧪 Try It Yourself

  1. Choose the cancellation or search feature on the Dummy Booking Website.
  2. Write 3 made-up business rules for it.
  3. Run Step 1 and correct any wrong rule yourself.
  4. Run Step 2, and answer the questions yourself as if you were the product owner.
  5. Run Steps 3 and 4. Check that every test case links to a rule.

📋 Ready-to-Copy Prompt

Use this as a starter prompt to plan a chain for any feature.

You are a senior QA engineer. I want to design tests for the feature
below, one step at a time.

Feature description:
[paste feature description]

Do Step 1 only:
- List each business rule as R1, R2 and so on.
- Do not add any rules that are not in the description.
- Then stop and wait for me to review the list.
Do not write any test cases yet.

⚠️ Common Mistakes

  • Sending the next step before reviewing the previous answer
  • Letting the AI answer its own business questions
  • Using a long chain for a very small change
  • Passing unreviewed output forward, so errors grow
  • Losing the link between rules and test cases

🎯 Key Takeaways

  • A prompt chain splits a large job into small, checkable steps.
  • The four steps are understand, question, plan and write.
  • People must answer the business questions, not the AI.
  • Rule IDs give you traceability from requirements to test cases.

🎤 Interview Questions

1. What is prompt chaining?

Model answer: Prompt chaining breaks a large task into a sequence of prompts, where each output feeds the next one. In testing, I use it to go from a requirement to rules, questions, scenarios and then detailed test cases.

2. Why use a prompt chain instead of a single prompt?

Model answer: It lets me check the work at each stage and catch wrong assumptions early. A single large prompt can hide mistakes, and those mistakes can spread through the entire test set.

3. How would you use AI to design tests from a requirement?

Model answer: I would extract the rules first and verify them. Next, I would ask for gaps and take those questions to the product owner. Then I would generate a scenario list with risk levels, review it and finally create detailed test cases.

4. What is requirement traceability, and how can a prompt chain support it?

Model answer: Traceability links each test back to the requirement it covers. In a chain, I give every rule an ID and ask the model to include that ID in each scenario and test case. I can then spot rules with no coverage.

5. Where should a human be involved in a prompt chain?

Model answer: A human should review every step and answer all business questions. The model can identify a gap, but it cannot know what the business decided. A person should also approve the final test cases.


📝 Assignment

Run the full four-step chain on a feature of your choice, using made-up rules. Create a small table showing each rule ID and the test cases that cover it. Highlight any rule with no test case. Also record one mistake you caught between steps.


❓ FAQ

Should I run all the steps in one chat?

You can, as long as the conversation stays focused. For long work, start a new chat and paste in only the reviewed output.

Can this be automated later?

Yes. A workflow that runs steps in order is the basic idea behind the AI agents you will build in Level 6. Human review points stay important there too.


🚀 Next Steps

Well done on finishing this lesson. Complete the assignment, then continue with Gherkin Test Cases with AI: Get Tables, JSON and CSV Output.