Few-Shot Prompting for Test Cases: Teach AI Your Team’s Format

Every QA team writes test cases in its own style. AI does not know yours until you show it. Few-shot prompting for test cases solves this by giving the AI a couple of good examples first. In this lesson you will learn how to pick those examples and when they are worth the effort.

📖 What You’ll Learn

  • What zero-shot, one-shot and few-shot prompting mean
  • How examples make AI output more consistent
  • How to choose good examples
  • The mistakes that can make examples backfire

💡 What Is Few-Shot Prompting?

Explain Like I’m 5: Few-Shot Prompting

Imagine: A teacher draws two neat letter As on the board. Then the class copies the same style.

What it really means: You show the AI a few finished examples. It then follows that pattern.

In testing: Show two test cases in your team’s format, then ask for more.

A “shot” simply means an example. The name tells you how many examples are in the prompt.

NameExamples givenGood for
Zero-shotNoneSimple questions and quick ideas
One-shotOneShowing a basic layout
Few-shotTwo or moreMatching a team format or a tricky pattern

🔍 Why Examples Help Testers

Explain Like I’m 5: Why Examples Work

Imagine: You can describe a zebra with many words. Or you can just show a picture. The picture is quicker.

What it really means: An example shows details that are hard to explain in words.

In testing: One example can show your ID style, tone and level of detail.

Examples are especially useful for showing:

  • Your test case ID pattern, such as LOGIN-001
  • How short or detailed steps should be
  • How expected results are worded
  • How you label priority and test type

🧩 How to Choose Good Examples

Explain Like I’m 5: Choosing Examples

Imagine: If you teach someone to draw by showing a messy picture, they will copy the mess.

What it really means: The AI copies the weaknesses in your examples as well as the strengths.

In testing: Only use test cases that you would approve in a review.

Follow these four rules:

  1. Use your best work. Pick examples that have already passed review.
  2. Show variety. Include one positive and one negative case.
  3. Keep them short. Two or three examples are often enough for a format.
  4. Remove real data. Replace names, accounts and internal URLs first.

Keep examples separate from the task

Label them clearly as examples. Otherwise, the AI may treat their details as rules for the new feature.


🌍 Real-Life Example: A Product Search Filter

A team uses the format below. Here is how a tester teaches it to the AI.

You are a QA engineer. Write test cases in exactly the format shown
in the examples. The examples are about a different feature. Use them
for format only.

EXAMPLE 1
ID: LOGIN-001
Title: Login succeeds with valid details
Priority: High
Type: Positive
Steps:
1. Open the login page
2. Enter a valid email and password
3. Select Log in
Expected: The dashboard opens and shows the user's name

EXAMPLE 2
ID: LOGIN-002
Title: Login is blocked with a wrong password
Priority: High
Type: Negative
Steps:
1. Open the login page
2. Enter a valid email and a wrong password
3. Select Log in
Expected: An error message appears and the user stays on the login page

NEW FEATURE
A shopper can filter products by a price range. Minimum and maximum
are both optional. The minimum cannot be greater than the maximum.

TASK
Write 6 test cases. Use the ID prefix FILTER. Use only the rules
above, and list any unclear rules as questions at the end.

The AI now knows the layout, ID style and level of detail. You can review the answer much faster, because every test case looks the same.


📌 When Few-Shot Prompting Is Not Needed

Examples take effort and use up space in the context window. Skip them for simple questions or quick brainstorming. Examples can also narrow the AI’s thinking, so it may copy their subject too closely. If you want fresh ideas, try without examples first.

Change one thing at a time

To learn whether your examples help, run the same task with and without them. Compare the results using the same review rules.


🧪 Try It Yourself

  1. Take two good test cases from your own practice work. Remove any private details.
  2. Choose a feature from the Dummy E-commerce Website.
  3. Run the task once with no examples.
  4. Open a new chat and run the prompt below with your examples.
  5. Count how many edits each answer needs before you would accept it.

📋 Ready-to-Copy Prompt

You are a QA engineer. Write test cases in exactly the format shown
in the examples below. The examples are about a different feature.
Copy their format only, not their content.

EXAMPLE 1
[paste a reviewed positive test case]

EXAMPLE 2
[paste a reviewed negative test case]

NEW FEATURE
[describe the feature and its business rules]

TASK
Write [number] test cases using the ID prefix [PREFIX].
Rules:
- Use only the information under NEW FEATURE.
- Do not invent fields, screens or rules.
- After the test cases, list anything unclear as questions.

⚠️ Common Mistakes

  • Using unreviewed or weak test cases as examples
  • Pasting examples that contain real customer data
  • Giving ten long examples when two short ones are enough
  • Showing only positive examples, then getting only positive output
  • Letting details from the examples leak into the new test cases

🎯 Key Takeaways

  • A “shot” is an example, and few-shot prompting uses two or more.
  • Examples are a quick way to teach your team’s test case format.
  • The AI copies weaknesses too, so use only reviewed examples.
  • Skip examples for simple tasks or open brainstorming.

🎤 Interview Questions

1. What is few-shot prompting?

Model answer: It means including a small number of worked examples in the prompt so the model can follow the pattern. In QA, I would show two reviewed test cases and then ask for more in the same format.

2. What is the difference between zero-shot and few-shot prompting?

Model answer: Zero-shot gives only the instruction, with no examples. Few-shot adds examples of the desired output. I use zero-shot for simple questions and few-shot when format or a particular pattern is important.

3. How do you choose examples for a few-shot prompt?

Model answer: I choose short, reviewed test cases that show a mix of scenarios, such as one positive and one negative. I remove real data and label them clearly so that the model treats them as a format guide.

4. What can go wrong with few-shot prompting?

Model answer: The model can copy mistakes in the examples, or carry their details into the new output. Too many examples also use up context and can limit variety. I review the result and compare it with a run that has no examples.

5. When would you avoid few-shot prompting?

Model answer: I would avoid it for simple questions and early brainstorming, where I want a wide range of ideas. If the model already gives acceptable results, adding examples is extra work with little benefit.


📝 Assignment

Create a few-shot template for your team’s test case format, with two reviewed and fully anonymised examples. Test it on two different features from the Automation Practice Page. Note any place where details from your examples leaked into the output.


❓ FAQ

How many examples should I give?

Two or three is a good starting point for matching a format. Add more only if testing shows that they improve the result.

Can I use examples from an earlier AI answer?

Yes, but only after you have reviewed and corrected them. Human-approved examples are the safest choice.


🚀 Next Steps

Well done on finishing this lesson. Complete the assignment, then continue with Prompt Chaining for Test Cases: From Requirement to Test Suite.

Prompt Engineering for Software Testers: The 5-Part QA Prompt Formula

A vague question gets a vague answer. That is true for people, and it is true for AI. This lesson teaches prompt engineering for software testers using one simple formula with five parts. You can use it on your very next task.

📖 What You’ll Learn

  • What a prompt is, and what makes one strong
  • The five parts of a good QA prompt
  • How to turn a weak prompt into a strong one
  • When to add each part, and when to leave it out

💡 What Is a Prompt?

Explain Like I’m 5: Prompt

Imagine: You ask a friend to fetch “a snack”. You might get anything. If you say, “Please bring one red apple from the kitchen table,” you get exactly that.

What it really means: A prompt is the instruction you give to AI. Clear instructions give better results.

In testing: “Test login” is the vague request. A full feature description is the clear one.

A prompt is the message you send to an AI assistant. Prompt engineering is the skill of writing that message so the answer is useful. It is not magic wording. It is clear communication, which good testers already practise in bug reports.


🔍 Prompt Engineering for Software Testers: The 5-Part Formula

Explain Like I’m 5: The 5-Part Formula

Imagine: Think of ordering a birthday cake. You say who it is for, what the party is like, what cake you want, what it must not contain, and what shape it should be.

What it really means: A strong prompt also has five parts: role, context, task, constraints and format.

In testing: Every part removes one guess the AI would otherwise make.

PartThe question it answersQA example
RoleWho should the AI act as?A senior QA engineer in banking
ContextWhat does it need to know?The user story and business rules
TaskWhat must it do?Write test scenarios for password reset
ConstraintsWhat are the limits?Use only the rules given, and list open questions
FormatHow should the answer look?A table with ID, steps, data and expected result

Here is an easy way to remember the order: who, what we know, what to do, what to avoid, how to show it.


🧩 Why Each Part Matters

Role

Explain Like I’m 5: Role

Imagine: When you play doctor, you talk about medicine. When you play chef, you talk about food.

What it really means: The role tells the AI which kind of knowledge and language to use.

In testing: “Security tester” brings different ideas than “accessibility tester”.

A role sets the point of view. It does not give the AI real experience, so it never replaces your review.

Context

Context is usually the most valuable part. Share the requirement, the business rules and the user type. Follow the data rules from AI Data Privacy for Testers before you paste anything.

Task

Ask for one clear job. “Write 10 negative test scenarios” is better than “help me with testing”. If a task has several stages, split it up. You will learn how in Lesson 8.

Constraints

Constraints protect you from AI hallucinations in software testing. The most useful constraint for testers is simple: do not invent rules, and list what is missing.

Format

Tell the AI exactly how to lay out the answer. A fixed layout is faster to review and easier to copy into your test tool.


🌍 Real-Life Example: Password Reset

Weak prompt:

Write test cases for password reset.

The AI has to guess the rules, so you get a generic list.

Strong prompt:

ROLE: You are a senior QA engineer testing a banking website.

CONTEXT: A user can request a password reset link by email.
- The link expires after 30 minutes.
- The link works only once.
- A new password must be 8 to 20 characters long.
- The new password cannot match the last 3 passwords.

TASK: Write 10 test scenarios for this feature. Include positive,
negative and boundary scenarios.

CONSTRAINTS: Use only the rules above. Do not invent any screens or
rules. If something is unclear, add it to a list called
"Questions for the product owner".

FORMAT: Return a table with ID, Scenario, Test Data, Expected Result
and Type.

Now the AI can include useful boundaries, such as passwords of 7, 8, 20 and 21 characters. It can also test a link at 29 and 31 minutes.


📌 When to Use a Shorter Prompt

You do not need all five parts every time. A quick question like “What does HTTP 403 mean?” needs no role or format. Use the full formula when the output will enter your real test work.


🧪 Try It Yourself

  1. Open the Dummy Banking Website and pick one feature.
  2. Write a one-line prompt for that feature, and save the answer.
  3. Fill in the five-part template below, using made-up details only.
  4. Open a new chat and run the full prompt.
  5. Compare both answers. Count the scenarios you would really use.

📋 Ready-to-Copy Prompt

ROLE: You are a senior QA engineer with experience in [domain].

CONTEXT:
Feature: [feature name]
User type: [who uses it]
Business rules:
- [rule 1]
- [rule 2]

TASK: Write [number] test scenarios covering positive, negative and
boundary cases.

CONSTRAINTS:
- Use only the information above.
- Do not invent screens, fields or rules.
- List anything unclear under "Questions for the product owner".

FORMAT: Return a table with ID, Scenario, Test Data, Expected Result
and Type (Positive, Negative or Boundary).

⚠️ Common Mistakes

  • Asking for “all possible test cases”, which has no clear end
  • Leaving out the business rules and then blaming the AI
  • Giving several unrelated jobs in one prompt
  • Forgetting to say what format you want
  • Thinking a role such as “expert” makes the answer correct

🎯 Key Takeaways

  • A prompt is an instruction, and clear instructions give better results.
  • Use five parts: role, context, task, constraints and format.
  • Context and constraints do the most to improve QA output.
  • You still review the answer, however good the prompt is.

🎤 Interview Questions

1. What is prompt engineering, and why does it matter for testers?

Model answer: Prompt engineering is writing clear instructions so an AI tool gives useful output. It matters for testers because generic prompts produce generic test cases. When I supply business rules and limits, the result is more relevant and easier to review.

2. What makes a good QA prompt?

Model answer: I include a role, the context, one clear task, constraints and an output format. For example, I give the acceptance criteria, ask for boundary and negative scenarios, tell the AI not to invent rules, and request a table.

3. How do you stop AI from inventing requirements?

Model answer: I paste the actual requirement, tell the AI to use only that text, and ask it to list missing information as questions. This lowers the risk but does not remove it, so I still trace each test case back to the requirement.

4. Does assigning a role such as “senior QA engineer” guarantee better answers?

Model answer: No. A role can guide the style and focus of the answer, but it does not give the model real project knowledge or make it accurate. Specific context and my own review have a much bigger effect on quality.

5. Give an example of improving a weak prompt.

Model answer: “Write test cases for login” is weak. I would state the user type, password rules and lockout limit, ask for positive, negative and boundary scenarios, forbid invented rules and request a table. Replace this with a prompt you have really improved at work.


📝 Assignment

Rewrite three prompts you have used before with the five-part formula. For each one, record the old prompt, the new prompt and what improved. Save the best one, because you will add it to your prompt library in Lesson 11.


❓ FAQ

Does the order of the five parts matter?

The order is not a strict rule. Keeping the same order simply makes prompts easier to write, read and reuse.

Will this formula work with any AI assistant?

The idea works with any mainstream chat assistant. Answers will differ between tools, so test important prompts in the tool your team uses.


🚀 Next Steps

Well done on finishing this lesson. Complete the assignment, then continue with Few-Shot Prompting for Test Cases: Teach AI Your Team’s Format.

AI Data Privacy for Testers: Your Toolkit and Safety Rules

Before you use AI on real project work, you need two things: a simple set of tools and clear rules about what you can share. One careless paste of a production log can expose customer data or a password. In this lesson you will set up your toolkit and learn AI data privacy for testers, one simple rule at a time.

📖 What You’ll Learn

  • The four types of AI tools a tester needs
  • A traffic-light rule for deciding what can be shared
  • How to replace sensitive details with safe test values
  • What to confirm with your company before starting

💡 The Four Tools in a QA AI Toolkit

Explain Like I’m 5: AI Toolkit

Imagine: You do not carry every book to school. You pack only what you need today.

What it really means: Start with a few useful tools and add more when you need them.

In testing: Begin with one chat assistant.

You do not need every product on the market. Start with the first tool and add the others as the course reaches them.

Tool typeUse it forWhen you need it
AI chat assistantRequirement analysis, test ideas, bug report wordingNow, Levels 1 to 3
Prompt librarySaving prompts that worked, in a document or a Git repositoryFrom Level 2
AI coding assistantWriting and explaining test code in your IDEFrom Level 4
Browser toolLetting AI look at a test site, as in Playwright MCPFrom Level 4, explained fully in Level 7

For named products and comparisons, see AI Tools for QA Engineers. Plans and features change often, so check each vendor’s current page before you choose.


🔍 The Traffic-Light Rule for AI Data Privacy

Explain Like I’m 5: Traffic-Light Rule

Imagine: At the road, green means go, yellow means slow down and red means stop.

What it really means: Give your data a colour before you share it with AI.

In testing: Made-up data is green. Internal test cases are yellow. Passwords are red.

Explain Like I’m 5: Secrets

Imagine: You would never give your house key to a stranger.

What it really means: Passwords and tokens are keys. Anyone holding one can get in.

In testing: Never paste a password, API key or token into an AI tool.

Stop for a moment and give your text a colour. Your company’s policy always has the final say, and this table is only a safe starting point.

LevelWhat it coversAction
GreenPublic documentation, your own made-up examples, public demo sites, synthetic test dataNormally fine to share
YellowInternal requirements, test cases, non-public code, sanitised logsOnly in tools your company has approved
RedPasswords, API keys, tokens, cookies, customer personal or financial data, health data, unsanitised production logsNever paste into an AI tool

Sanitise it first, and do it yourself

Do not paste sensitive data into an AI tool and ask it to remove the sensitive parts. By then, the data has already been shared.


🧩 How to Sanitise Data Before Sharing

Explain Like I’m 5: Sanitising Data

Imagine: Before you show a class photo to a stranger, you put stickers over the faces and name tags. People can still see it is a class photo.

What it really means: Replace real details with fake placeholders.

In testing: Change a real email address to <TEST_USER_EMAIL>.

Replace real values with obvious fake ones, while keeping the structure the AI needs. All values in this example are made up.

Before (do not share this):

2026-03-14 10:22:41 ERROR Payment failed
user=rahul.sharma@realbank.example card=4111********1234
auth_token=eyJhbGciOi... endpoint=https://payments.internal.realbank.example/v2/charge

After (safer to share in an approved tool):

<timestamp> ERROR Payment failed
user=<TEST_USER_EMAIL> card=<MASKED_CARD>
auth_token=<REDACTED> endpoint=https://<INTERNAL_HOST>/v2/charge

The AI can still help you understand the error flow, and no real identity or secret has left your control.


🛠️ What to Confirm Before Using AI at Work

  • Does the company have an AI usage policy, and which tools does it approve?
  • Are you using a personal account or a company-managed one?
  • Can the provider use your chats to train its models, and can that be turned off? This varies by plan and setting.
  • Are chats stored, and for how long?
  • Do client contracts restrict the use of AI tools?

If you are not sure, ask your manager or security team first. Practise on public demo sites and made-up data until you get an answer.


🌍 Real-Life Example: Debugging a Failed Payment Test

A tester wants help with a failing payment test from a production-like environment. The log contains a token and a customer’s email address.

Unsafe approach: paste the whole log into a personal AI account.

Safe approach: check that the tool is approved, copy only the relevant lines, replace identifiers and secrets with placeholders, and ask for possible causes. If a token was exposed anywhere, tell the security team, as it may need to be rotated.


🧪 Try It Yourself

  1. Choose one AI chat assistant that you are allowed to use.
  2. Open its privacy or data settings, and note what they say about training and chat history.
  3. Create a folder called ai-qa-toolkit with a file called prompt-library.md.
  4. Use the prompt below to create synthetic data, and save the prompt in your library.
  5. Check the output against the rules in the prompt, and note anything it got wrong.

📋 Ready-to-Copy Prompt

You are a QA test data specialist.

Create 8 synthetic user records for testing a registration form.
Return a table with these columns:
first_name, last_name, email, phone, date_of_birth, scenario

Rules:
- All data must be clearly fake.
- Use only the domain example.com for email addresses.
- Include valid records and these invalid cases: missing email,
  invalid email format, user under 18, name with special characters.
- The scenario column must say what each record tests.
- Do not use the names or details of real people.

⚠️ Common Mistakes

  • Pasting full production logs without reading them first
  • Assuming a paid account is automatically private
  • Leaving API keys in code or configuration you share with AI
  • Asking AI to remove secrets from data you have already pasted
  • Using a personal account for company work without permission

🎯 Key Takeaways

  • Start with one approved chat assistant and a prompt library.
  • Classify information as green, yellow or red before you share it.
  • Sanitise data yourself before sharing it with a tool.
  • Your company’s AI policy overrides general advice.

🎤 Interview Questions

1. What data should never be shared with a public AI tool?

Model answer: Credentials, API keys, tokens, cookies, customer personal or financial data, health data and unsanitised production logs. I would also keep confidential requirements and source code out of any tool my company has not approved.

2. How would you use AI safely to analyse a production log?

Model answer: I would first confirm that the tool is approved. Then I would extract only the relevant section, replace personal data and secrets with placeholders and ask for possible causes. I would confirm the root cause with real evidence inside our own systems.

3. What is synthetic test data, and why is it useful with AI?

Model answer: Synthetic data is artificial data that resembles real data but belongs to no real person. It lets us test realistic scenarios without privacy risk. AI can generate it quickly, but I validate it against the format and business rules.

4. Your team wants to adopt an AI tool. What would you check?

Model answer: I would check the company policy, data retention, whether data is used for training, access controls, compliance needs and client contract restrictions. I would then run a small pilot using safe data and measure the actual benefit before wider use.

5. What would you do if you accidentally pasted a real API key into an AI chat?

Model answer: I would treat the key as exposed and report it immediately according to the company process. The key should be revoked or rotated, and access logs checked. Deleting the chat alone is not enough. I would then add a check to stop it from happening again.


📝 Assignment

Build your ai-qa-toolkit folder with three files: prompt-library.md containing the prompts from Lessons 1 to 5, data-rules.md containing your personal traffic-light table, and sanitised-log-example.md containing a fake log before and after sanitising. This completes Level 1.


❓ FAQ

Which AI tool is best for testers?

There is no single best tool for everybody. Use one your company approves, get comfortable with it, and focus on the review skills, which transfer to any tool.

Can I use AI at work if my company has no policy?

Ask your manager or security team first. Until you have a clear answer, practise only with public demo sites and made-up data.


🚀 Next Steps

Well done on finishing this lesson. Complete the assignment, then continue with Prompt Engineering for Software Testers: The 5-Part QA Prompt Formula.

Will AI Replace Software Testers? How the QA Role Is Changing

“Will AI replace software testers?” is one of the most common questions in QA today. Nobody can predict the future with certainty, but we can look at which tasks AI handles well and which still need human judgment. In this lesson you will build an honest view of the change and a plan for your own career.

📖 What You’ll Learn

  • Which testing tasks AI speeds up, and where humans remain responsible
  • Which QA skills are gaining value
  • How the QA career ladder is changing
  • How to create your own AI skills plan

💡 Will AI Replace Software Testers? What AI Does and What You Decide

Explain Like I’m 5: AI and the Tester

Imagine: A robot vacuum cleans the floor fast. But it cannot decide if the house is ready for guests. A parent decides that.

What it really means: AI is fast at routine work. People make the important decisions.

In testing: AI drafts test cases. You decide if the release is safe.

AI is strongest when a task is text-heavy, repetitive and easy to review. It is weaker when the task needs business context, accountability or knowledge that was never written down.

Testing taskHow AI helpsWhat the tester still owns
Requirement reviewSpots unclear wording and gapsConfirming the intended behaviour with stakeholders
Test case designDrafts scenarios quicklyRisk priority and real coverage
Test dataCreates synthetic dataMaking sure it fits business rules
Automation codeDrafts tests and page objectsFramework design, code review, stability
Failure analysisSummarises logs and suggests causesConfirming the actual root cause
Bug reportsImproves clarity and structureSeverity, impact and evidence
Release decisionsSummarises test resultsGiving a risk-based recommendation

An honest view

Work that only produces routine test cases or simple scripts is likely to shrink or change. Work that combines product knowledge, risk thinking, automation and AI judgment is likely to become more valuable.


🔍 Skills That Are Gaining Value

Explain Like I’m 5: Why Your Skills Still Matter

Imagine: A calculator gets sums right very fast. But you still have to know which sum to do.

What it really means: A tool is only useful if someone knows what to ask it.

In testing: AI can write a test. You decide what is worth testing.

  • Test design and risk thinking: deciding what matters most remains central.
  • Domain knowledge: banking, healthcare and insurance rules are rarely obvious to a general model.
  • Prompting with context: getting useful output by supplying the right information.
  • Reviewing AI output: spotting wrong logic, weak assertions and invented behaviour.
  • Automation and APIs: AI writes code faster, but someone must judge and maintain it.
  • Testing AI products: checking chatbots and AI helpers is a growing area.
  • Data safety: knowing what must never be shared with an AI tool.

🧩 The QA Career Ladder with AI

Explain Like I’m 5: Career Ladder

Imagine: In a video game, you finish an easy level and unlock a harder one. Each level gives you a new power.

What it really means: Your career grows in stages, and each stage adds a new skill.

In testing: First use AI, then automate with it, then build your own AI helpers.

StageTypical AI capabilityWhere this course covers it
Manual or functional testerUses AI for requirements, test design and bug reportsLevels 1 to 3
Automation engineerGenerates and reviews UI and API tests with AILevel 4
AI-aware QA engineerTests LLM features and builds evaluation setsLevel 5
SDET or agent builderBuilds QA agents and MCP toolsLevels 6 to 8
AI QA engineer or architectRuns QA agents in production with guardrails and metricsLevels 9 to 10

These titles vary between companies, so read the actual job description and not only the title. To build automation skills, start the free Playwright with TypeScript course. To see what interviewers ask, read these AI + QA automation interview questions.


🌍 Real-Life Example: Two Testers, One Sprint

Both testers receive a new payments story.

Tester A asks AI for test cases, pastes all 40 into the test tool and marks the work as done. Several cases include rules that do not exist, and refund handling is never tested.

Tester B gives AI the story, reviews the draft, removes invented rules and adds refund, timeout and duplicate-payment risks from past incidents. Tester B finishes faster than before and with better coverage.

The tool was the same. The difference was the tester’s judgment.


🧪 Try It Yourself

  1. Write down the 10 tasks you spend most of your working week on.
  2. Paste them into the prompt below, without any company names or confidential details.
  3. Compare the AI’s suggestions with your own experience.
  4. Choose one task to improve with AI next week, and note how long it takes today.

📋 Ready-to-Copy Prompt

You are a QA career mentor. I am a [manual tester / automation engineer]
with [X] years of experience, working in the [domain] domain.

These are my regular weekly tasks:
[list your tasks]

For each task, give me:
1. How AI could help
2. The risk of relying on AI for it
3. What I must still review myself

Then recommend the 3 skills I should learn first and explain why.
Base your advice only on the information above. Ask me up to 3
questions if something important is missing.

⚠️ Common Mistakes

  • Ignoring AI because of fear, or expecting it to do the whole job
  • Learning only tool names without improving test design
  • Listing AI on a resume without being able to give a real example
  • Measuring productivity by the number of test cases produced
  • Claiming time savings you did not actually measure

🎯 Key Takeaways

  • AI changes which testing tasks take the most time, but accountability stays with people.
  • Test design, domain knowledge and output review are gaining value.
  • The strongest profile combines QA fundamentals, automation and practical AI skills.
  • Start with one task, and measure the result honestly.

🎤 Interview Questions

1. Will AI replace software testers?

Model answer: I think AI will change testing more than remove the need for it. It can speed up drafting, data creation and log analysis, but someone still has to understand the risk, verify the output and be accountable for quality. Routine work may shrink, so I am building skills in test design, automation and evaluating AI.

2. What testing tasks would you not leave entirely to AI?

Model answer: I would not leave release decisions, severity judgment, security-sensitive changes or final expected results entirely to AI. These depend on business context and accountability. AI can support them with summaries and suggestions, but a person should decide.

3. How has AI changed your day-to-day QA work?

Model answer: Use a true example with this structure: the task, how you used AI, what you corrected, and the measured result. For instance: “I used AI to draft scenarios from a user story. I removed unsupported rules, added boundary cases and measured the time saved on that task.”

4. Which skills matter most for a QA engineer working with AI?

Model answer: Strong test design comes first because it tells me whether AI output is any good. After that, I would choose prompting with proper context, automation skills, data safety awareness and basic knowledge of how to evaluate AI systems.

5. How would you measure whether AI is really helping a QA team?

Model answer: I would compare a baseline with results after adoption. Useful measures include time to prepare tests, percentage of AI output accepted after review, defects escaped to production and time spent fixing generated tests. Speed alone is not enough, since quality must not fall.


📝 Assignment

Create a one-page AI skills plan with four parts: your current role, your target role in 12 months, the 3 skills you will build first, and one measurable AI improvement you will try next week. Save it, because you will use it again in Level 10 when you update your profile.


❓ FAQ

I am a manual tester. Am I too late to learn this?

No. Levels 1 to 3 need no coding, and your experience with test design and product behaviour is exactly what makes AI output useful.

Should I learn AI or automation first?

Learn AI basics now because they are quick to pick up and useful immediately, then continue with automation. Automation skills become even more valuable when you need to judge AI-generated code.


🚀 Next Steps

Well done on finishing this lesson. Complete the assignment, then continue with AI Data Privacy for Testers: Your Toolkit and Safety Rules.

AI Hallucinations in Software Testing: Why AI Output Must Be Checked

AI can invent a Playwright method, a business rule or a test result, and present it with complete confidence. This is called a hallucination. Finding it is exactly the kind of work testers are good at. In this lesson you will learn where AI hallucinations in software testing appear and how to catch them.

📖 What You’ll Learn

  • What a hallucination is and why it happens
  • The six most common hallucinations in QA work
  • How to reduce them with better prompts
  • A 5-step checklist for reviewing any AI output

💡 What Is an AI Hallucination?

Explain Like I’m 5: Hallucination

Imagine: Ask a small child, “Where does the moon sleep?” The child may say, “In a big cloud bed!” The child is not lying. The child just filled the gap with a story.

What it really means: AI sometimes makes up an answer that sounds right but is not true.

In testing: AI shows you a Playwright method that does not exist.

A hallucination is AI output that sounds believable but is false or unsupported. It happens because an LLM generates likely text and does not automatically check facts. When it lacks information, it may fill the gap instead of saying it does not know.

Treat AI like a new team member

A new teammate can be fast and helpful, but you would still review their first test cases. Give AI output the same review, every time.


🔍 Six Hallucinations Testers Meet

TypeExampleHow to catch it
Invented code methodA Playwright method that does not existCheck the official docs, then run the code
Invented locator#login-btn when the page has no such IDInspect the real page
Invented business rule“Password must include a symbol” when the story never says soCompare with the requirement
Invented packageAn npm install command for a package that does not existCheck the package registry before installing
Wrong expected resultA wrong tax value in a test caseCalculate it yourself or ask the product owner
False claim of work“I ran the tests and all passed” when nothing was runAsk for evidence, and run them yourself

Security warning

Attackers can publish malicious packages using names that AI tools tend to invent. Never install a package just because AI suggested it. Check that it exists, who maintains it and whether it is widely used.

Explain Like I’m 5: Fake Packages

Imagine: Children keep asking for a toy that does not exist. A bad person hears this, makes a box with that name and puts something harmful inside.

What it really means: AI can invent a package name, and an attacker can then publish a harmful package with that name.

In testing: Check a package before you install it.


🧩 Why This Matters More in Testing

Explain Like I’m 5: A Wrong Answer Key

Imagine: A teacher marks homework using a wrong answer key. A wrong answer gets a gold star, and nobody notices.

What it really means: A test only compares the app with the expected result it was given.

In testing: If AI writes a wrong expected result, a bug can pass as green.

A hallucination in a test can be worse than no test at all. Suppose AI writes a test with a wrong expected result. Your suite goes green, the defect reaches production, and everyone believes the feature was verified. A passing test only proves that the code matched the expectation someone wrote, and that expectation may be wrong.


🛠️ How to Reduce Hallucinations

You can reduce hallucinations, but you cannot remove them completely.

  • Provide the source: paste the requirement instead of describing it from memory.
  • Limit the scope: tell the AI to use only the information you supplied.
  • Allow “I don’t know”: ask it to list assumptions and missing information.
  • Ask where it came from: have each test case point to its requirement line.
  • Use real page details: give the AI actual HTML or labels so it does not guess locators. You can practise on the Automation Practice Page.

📌 The 5-Step Review Checklist

Explain Like I’m 5: Reviewing AI Output

Imagine: Before you eat an apple from a new basket, you look at it and wash it.

What it really means: Always check AI’s work before you use it.

In testing: Run these 5 checks on every AI answer.

Use this for anything AI produces.

  1. Source: can every statement be traced to a requirement or document?
  2. Reality: do the screens, fields, APIs and methods actually exist?
  3. Expected results: are they correct according to the business rule, and not just plausible?
  4. Coverage: what did the AI miss, such as negative, boundary, role or data cases?
  5. Execution: have you actually run the code or steps yourself?

🌍 Real-Life Example: Reviewing an AI Test Case

Requirement: “A user can apply one coupon per order. The coupon gives 10% off.”

AI-generated test case: “Apply SAVE10 to an order of 1000. Expected: the total is 900, and free shipping is applied.”

Run the checklist. The 900 total is correct for a 1000 order. Free shipping appears nowhere in the requirement, so it is invented. The coupon name is also assumed. A reviewer should remove the shipping claim, confirm a valid coupon code, and add the missing case of applying a second coupon.


🧪 Try It Yourself

Test the AI the way you would test an application.

  1. Open a new chat and paste the prompt below. The method named in it does not exist.
  2. See whether the AI explains how to use it, or tells you it does not exist.
  3. Check the official Playwright Page API documentation.
  4. If the AI caught the problem, ask about a realistic invented option such as a made-up setting in playwright.config.ts, and compare again.
  5. Record which answers were correct and how confident each one sounded.

📋 Ready-to-Copy Prompt

Show me how to use page.waitForMagicElement() in Playwright with
TypeScript. Give me a short example for a login page.

Then use this prompt whenever you want AI to review a set of test cases:

Review the test cases below against the requirement.

Rules:
- Use only the requirement text as the source of truth.
- For each test case, quote the requirement line it is based on.
- Flag any step or expected result that is not supported by the
  requirement as "UNSUPPORTED".
- List missing positive, negative and boundary scenarios.
- If information is missing, say so. Do not guess.

Requirement:
[paste requirement]

Test cases:
[paste test cases]

⚠️ Common Mistakes

  • Believing an answer because it is detailed and confident
  • Asking the same AI “Are you sure?” and treating its reply as proof
  • Running AI-suggested install commands without checking them
  • Changing an expected result just to make a test pass
  • Skipping review because the AI output looks tidy

🎯 Key Takeaways

  • A hallucination is believable but false or unsupported output.
  • Hallucinations can be reduced with good context, but never fully removed.
  • A wrong expected result can create false confidence, which is a serious risk.
  • Use the 5-step review checklist on every AI output.

🎤 Interview Questions

1. What is an AI hallucination?

Model answer: It is output that sounds believable but is false or not supported by the available information, such as a Playwright method that does not exist. It happens because the model generates likely text and does not automatically verify facts.

2. How do you verify AI-generated test cases?

Model answer: I trace each test case back to the requirement and remove unsupported steps. I confirm that the screens and fields exist, check each expected result against the business rule, and add missing negative and boundary cases. For automation, I also run the code.

3. How can you reduce hallucinations when using AI for testing?

Model answer: I give it the actual requirement and real page details, tell it to use only that information, and ask it to list assumptions and unknowns. Asking for traceability also makes unsupported content easy to spot. These steps reduce the risk, but I still review the output.

4. Can a passing AI-generated test still be a bad test?

Model answer: Yes. It may assert the wrong expected result, check something trivial or never reach the real behaviour. A pass only means the application matched that assertion, so I review what the test really verifies. One useful check is to break the behaviour on purpose and confirm the test fails.

5. What risk comes from AI-suggested packages?

Model answer: AI can suggest a package name that does not exist, and an attacker could register that name with malicious code. I verify that the package exists, is maintained and is approved by my team before installing it.


📝 Assignment

Ask an AI assistant to write 10 test cases for a feature of the Dummy E-commerce Website. Apply the 5-step checklist, and create a table showing each problem you found, its hallucination type and your correction.


❓ FAQ

Will newer AI models stop hallucinating?

Newer models can improve, but you should not assume hallucinations will disappear. Verification remains part of responsible AI use.

Can I ask a second AI to check the first one?

Yes, a second review can find extra issues, but it is another opinion and not proof. The requirement, official documentation and real execution remain your sources of truth.


🚀 Next Steps

Well done on finishing this lesson. Complete the assignment, then continue with Will AI Replace Software Testers? How the QA Role Is Changing.

How LLMs Work: Tokens, Context and Why Answers Change

Ask an AI assistant the same question twice and you may get two different answers. To a tester, that looks like a flaky test. In this lesson you will learn how LLMs work and why this happens, using four simple ideas: tokens, context, temperature and training cutoff.

📖 What You’ll Learn

  • How an LLM produces an answer, one small piece at a time
  • What tokens and the context window are, and why they matter
  • Why the same prompt can give different output
  • What this means for how you use AI in testing

💡 How LLMs Work: One Small Piece at a Time

Explain Like I’m 5: How an LLM Answers

Imagine: You and a friend play a game. Your friend says, “The cat sat on the…” and you shout, “mat!” You keep going, one word at a time, until the sentence ends.

What it really means: The model keeps guessing the next small piece of text.

In testing: It may guess an error message your app never shows.

An LLM does not look up an answer in a database. It predicts the next small piece of text, adds it to the answer, and predicts again until it finishes.

Complete this sentence: “When the password is wrong, the login page should show an error ___.” You probably thought of “message”. An LLM does something similar, using patterns learned from huge amounts of text.

The key insight

An LLM predicts what text is likely to come next. Likely is not the same as true. Keep this in mind whenever you review AI output.


🔍 Tokens: How the Model Reads Text

Explain Like I’m 5: Token

Imagine: A big LEGO house is built from small bricks. A sentence is built from small pieces too. Those pieces are tokens.

What it really means: Tokens are the small chunks of text the model reads and writes.

In testing: A long log has many tokens, so it costs more and fills up the model’s space faster.

A token is a small chunk of text, often a whole short word or part of a longer one. In English, one token averages roughly three quarters of a word, but the exact split depends on the model. Tokens matter for two reasons:

  • Paid AI services usually charge by the number of tokens.
  • Every model has a limit on how many tokens it can handle at once.

🧩 Context Window: The Model’s Working Memory

Explain Like I’m 5: Context Window

Imagine: You have a small desk. Only so many papers fit on it. When you add a new paper, an old one may fall off.

What it really means: It is the amount of text the model can look at in one go.

In testing: In a very long chat, your first requirement may fall off the desk.

The context window is the amount of text a model can consider at one time. It holds your instructions, your conversation so far, any files you shared and the answer being written.

SituationWhat can happenWhat a tester should do
A very long chatEarly details may be dropped or ignoredStart a new chat for each task
A huge log file pasted inThe important line may get lostShare only the relevant section
A new chat is openedThe model normally knows nothing from the old chat unless a memory feature is onPaste the key context again

🛠️ Temperature: Why Answers Change

Explain Like I’m 5: Temperature

Imagine: At the ice-cream shop, one child always picks vanilla. Another child picks a new flavour every time. Low temperature is the vanilla child. High temperature is the adventurous child.

What it really means: It is a setting that controls how much variety the answers have.

In testing: Use low for test data and higher for unusual test ideas.

At each step, the model has many possible next words. Some are more likely than others. It does not always choose the most likely one. A setting called temperature controls how much variety is allowed.

TemperatureBehaviourGood for
LowMore focused and repeatableStructured test data, code
HighMore varied and creativeBrainstorming unusual test ideas

Most chat apps do not show this setting, but developers can set it when using an API. Even at a low setting, answers may not be perfectly identical, so never design a check that depends on exact AI wording.


📌 Training Cutoff: The Model’s Knowledge Has a Date

Explain Like I’m 5: Training Cutoff

Imagine: A storybook printed last year cannot tell you what happened yesterday.

What it really means: The model only learned from information up to a certain date.

In testing: It may not know the newest Playwright version.

A model learns from data collected up to a certain date, called its training cutoff. It may not know about the latest Playwright release, and it may suggest a method that has since changed. Some assistants can search the web, but you should still check the official documentation or a current guide such as our Playwright with TypeScript course.


🔑 What the Model Does Not Know

An LLM has never seen your application unless you give it the details. It does not know your business rules, your test environment or last week’s defect. A vague prompt forces it to guess, and a guess can look very convincing. The next lesson shows how these AI hallucinations in software testing appear.


🌍 Real-Life Example: Two Prompts, Two Results

Prompt A: “Write test cases for login.”

The model must guess the fields, the rules and the format, so you get generic cases.

Prompt B: “Write test cases for a login form with email and password. Passwords need 8 to 20 characters. The account locks after 5 failed attempts. Return a table with ID, steps, test data and expected result.”

The model now has real context, so boundary cases such as 7, 8, 20 and 21 characters become much more likely. You will master this skill in Level 2.


🧪 Try It Yourself

In this experiment, you will see AI answers change with your own eyes.

  1. Open three new chats in an AI assistant.
  2. Paste the prompt below into each one, without changing it.
  3. Record the scenarios from each chat in a table.
  4. Mark which scenarios appear in all three chats, and which appear in only one.
  5. Combine the best of them into one list and add anything all three missed.

📋 Ready-to-Copy Prompt

You are a senior QA engineer.

Feature: A coupon code field on a checkout page.
Rules:
- One coupon per order
- Coupons expire on a set date
- Minimum order value is 500

List the 10 most important test scenarios, one line each.
Label each one as Positive, Negative or Boundary.
Do not add rules that I have not given you. List any questions
you would ask the product owner at the end.

⚠️ Common Mistakes

  • Continuing one long chat across unrelated tasks
  • Pasting a huge file and expecting the model to find the single important line
  • Assuming the model knows your application or the latest tool version
  • Treating one AI answer as complete coverage
  • Writing automated checks that compare exact AI wording

🎯 Key Takeaways

  • LLMs predict text token by token, so likely output is not guaranteed to be true.
  • The context window limits what the model can consider at one time.
  • Output can vary between runs, so review every result and never rely on exact wording.
  • Better context produces better answers.

🎤 Interview Questions

1. What is a token in an LLM?

Model answer: A token is a small unit of text that the model processes, often a short word or a part of a longer word. Tokens matter because they affect both the cost of a request and how much text fits in the context window.

2. What is a context window?

Model answer: It is the maximum amount of text the model can consider at one time, including instructions, chat history, files and its own answer. As a tester, I keep context focused by sharing only the relevant requirement or log section and starting a fresh chat for a new task.

3. Why does an LLM give different answers to the same prompt?

Model answer: The model chooses each token from a set of probabilities, and it often does not pick the single most likely option every time. Temperature controls that variation. Model updates can also change results over time, so I test AI behaviour against acceptance criteria instead of exact text.

4. What is temperature, and what value would you use to generate test data?

Model answer: Temperature controls how much randomness is used when choosing the next token. For structured test data I would use a low value for more consistent output, and I would still validate the data against the expected format.

5. What is a training cutoff, and why should a test engineer care?

Model answer: It is the date up to which the model’s training data was collected. A model may suggest outdated syntax or not know a recent framework release, so I check generated code against the current official documentation and run it before trusting it.


📝 Assignment

Repeat the three-chat experiment with a feature from your own project, using made-up details only. Write 5 lines on what changed between runs, what stayed the same, and which test scenarios a human had to add.


❓ FAQ

Does the AI remember my earlier conversations?

It depends on the product and your settings. Some assistants offer a memory feature, but by default you should assume a new chat starts with no knowledge of earlier ones.

Is a bigger context window always better?

Not always. A bigger window lets you share more, but irrelevant text can still distract the model. Focused context usually gives better test ideas.


🚀 Next Steps

Well done on finishing this lesson. Complete the assignment, then continue with AI Hallucinations in Software Testing: Why AI Output Must Be Checked.

Generative AI and LLMs for Software Testers, Explained Simply

AI words appear in every QA job description now, but you do not need a maths degree to understand them. This simple guide to generative AI and LLMs for software testers explains what each term means, how these systems differ from the software you test every day, and why a tester’s mindset is a real advantage.

📖 What You’ll Learn

  • The difference between AI, ML, deep learning, generative AI and LLMs
  • Why AI-based software behaves differently from rule-based software
  • Where testers already meet AI at work
  • How to explain these terms clearly in an interview

💡 Why Testers Should Learn AI Basics

Testers meet AI in two ways. You use AI to do your work faster, such as drafting test cases or explaining an error. You also test AI when your product adds a chatbot, a recommendation engine or a smart search. Both need the same foundation: knowing what these systems are and how they fail.


🔍 What Are AI, ML, Generative AI and LLMs?

Explain Like I’m 5: AI

Imagine: A toy robot sorts your blocks by colour without your help. It looks like it is thinking.

What it really means: Software that does jobs we usually connect with human thinking.

In testing: A tool picks which tests to run first.

Explain Like I’m 5: Machine Learning

Imagine: Nobody gave you a list of rules for spotting a dog. You saw lots of dogs, and then you just knew.

What it really means: Software that learns from many examples. It does not only follow written rules.

In testing: A model studies old bugs and guesses where new bugs may hide.

Explain Like I’m 5: Deep Learning

Imagine: Friends stand in a line and pass a picture along. One spots lines. The next spots shapes. The last one shouts, “It’s a cat!”

What it really means: Machine learning with many layers. Each layer learns a little more than the last.

In testing: A visual tool recognises a button in a screenshot.

Explain Like I’m 5: Generative AI

Imagine: You have heard many bedtime stories. Now you can make up a new one of your own.

What it really means: AI that makes new text, code or pictures after learning from lots of examples.

In testing: AI writes a first draft of a bug report.

Explain Like I’m 5: LLM

Imagine: You have a friend who has read nearly every book. You say, “Once upon a…” and your friend says, “time!” They keep guessing the next word until the story ends.

What it really means: A generative AI trained on huge amounts of text. It predicts what text comes next.

In testing: ChatGPT, Claude or Gemini answers your question about Playwright.

Think of these terms as circles inside circles. AI is the biggest circle, and LLMs sit inside it. Here is the same list as a quick table.

TermPlain meaningExample a tester will recognise
Artificial Intelligence (AI)Any software that performs tasks we normally connect with human thinkingA tool that decides which tests to run first
Machine Learning (ML)Software that learns patterns from data instead of following only hand-written rulesA model that predicts which module is likely to have defects
Deep LearningML that uses large, layered neural networksVisual testing that recognises a button in a screenshot
Generative AI (GenAI)AI that creates new content such as text, code or imagesCreating test data or a draft bug report
Large Language Model (LLM)A GenAI model trained on huge amounts of text that predicts what text should come nextChatGPT, Claude or Gemini answering a question about Playwright

Remember this one line

An LLM is a kind of generative AI, generative AI mostly uses deep learning, deep learning is a kind of machine learning, and machine learning is a kind of AI.


🧩 Rule-Based Software vs AI-Based Software

Explain Like I’m 5: Rule-Based vs AI-Based

Imagine: A light switch is rule-based. Press it and the light comes on, every time. A puppy is AI-based. It learned from you, and it may not do the same thing every time.

What it really means: Rule-based software follows fixed instructions. AI-based software learned its behaviour from data.

In testing: The switch has one right answer. With the puppy, you have to judge if it behaved well.

Most applications you have tested are rule-based. A developer writes the rule, and you verify it. AI-based software learns its behaviour, and that changes how you test it.

PointRule-based softwareAI-based software
How behaviour is createdDevelopers write the logicThe model learns from data
Same input, same output?Normally yesOften no
Expected resultUsually one exact valueOften a range of acceptable answers
Typical defect sourceCode, configuration, dataTraining data, prompts, model version, code
Typical checkexpect(total).toBe(500)Is the answer correct, safe and relevant?

🛠️ Where You Already Meet AI at Work

  • Chat assistants that draft test cases, SQL queries or bug reports
  • Coding assistants in VS Code that suggest Playwright or Selenium code
  • Visual testing tools that compare screens
  • Self-healing tools that try to repair a broken locator
  • Product features such as chatbots, fraud detection and product recommendations

You can see named examples in AI Tools for QA Engineers.


🌍 Real-Life Example: A Login Story

Imagine this requirement: a user can log in with an email and password, and the account locks after 5 failed attempts.

A rule-based login check has an exact expected result. After 5 wrong passwords, the account must be locked. Now imagine the same site has an AI support bot, and a user asks, “Why can’t I log in?” There is no single correct sentence. You check whether the reply is accurate, mentions the lock if relevant, avoids exposing another user’s data and stays polite.

Same product, two very different test approaches. That difference is the main idea of this lesson.


🧪 Try It Yourself

  1. Open any AI chat assistant you are allowed to use.
  2. Paste the prompt below.
  3. Read the answer and mark each scenario as rule-based or AI-based yourself before you look at the AI’s label.
  4. Note any place where you disagree with the AI, and decide who is right.

📋 Ready-to-Copy Prompt

You are a senior QA engineer teaching a beginner.

Here are 6 features of an e-commerce website:
1. Add item to cart
2. "Recommended for you" product list
3. Coupon code validation
4. Customer support chatbot
5. Order total calculation
6. Search results ranked by relevance

For each feature, tell me:
- Whether it is most likely rule-based or AI-based
- How the expected result would be defined
- One test idea

Return the answer as a table. If you are unsure about a feature, say so
and explain what you would need to know.

⚠️ Common Mistakes

  • Using “AI” and “LLM” as if they mean the same thing
  • Assuming AI output is correct because it sounds confident
  • Assuming every “smart” feature in a product is really AI, without asking how it works
  • Testing an AI feature with exact text matches only

🎯 Key Takeaways

  • AI contains ML, ML contains deep learning, and LLMs are one type of generative AI.
  • AI-based software learns behaviour from data, so its output can vary.
  • Testers both use AI and test AI, and this course covers both.

🎤 Interview Questions

1. What is the difference between AI and machine learning?

Model answer: AI is the broad goal of making software perform tasks that normally need human intelligence. Machine learning is one way to achieve it, where the system learns patterns from data instead of relying only on hand-written rules. All ML is AI, but not all AI is ML. A fixed rules engine could be called AI without learning anything.

2. What is generative AI?

Model answer: Generative AI creates new content such as text, code or images based on patterns it learned during training. In QA, I would use it to draft test scenarios or synthetic test data, and I would review the output before using it.

3. What is an LLM?

Model answer: A Large Language Model is a generative model trained on a very large amount of text. It predicts the most suitable next piece of text based on what came before. That is why it writes fluently, and also why it can be wrong while sounding confident.

4. How is testing an AI feature different from testing a normal feature?

Model answer: A normal feature usually has one exact expected result, so I can assert a specific value. An AI feature may give different valid answers, so I define acceptance criteria such as correctness, relevance and safety, then evaluate against a prepared set of examples.

5. How do you use AI as a tester?

Model answer: I use it as an assistant for first drafts, such as test ideas, test data and bug report wording. I stay responsible for the result, so I check it against the requirement, remove anything invented and add the domain cases it missed. Replace this with a real example from your own work.


📝 Assignment

Pick one application you use daily, such as a shopping or banking app. List 5 features, label each one rule-based or AI-based, and write how you would define the expected result for each. Keep this file, because you will extend it later in the course.


❓ FAQ

Do I need to know maths or coding for this level?

No. Level 1 needs no coding and no maths. Coding starts in Level 4, and the site’s Playwright with TypeScript course can help you prepare.

Is ChatGPT the same as AI?

No. ChatGPT is one product built on LLMs, and LLMs are only one part of the wider AI field.


🚀 Next Steps

Well done on finishing this lesson. Complete the assignment, then continue with How LLMs Work: Tokens, Context and Why Answers Change.

API Testing Practice: Free REST API with Auth and 141 Scenarios

Practise API testing on a live REST API: hardcoded GET data, temporary objects you can create, update and delete, and four authentication types, with 141 ready-made test scenarios.

Free practice REST API · no sign-up · CORS enabled

Practise API testing on a real REST API

Pick an endpoint, press Send request and compare your response with the expected one. GET data is hardcoded, objects you create disappear on their own, and four auth types are ready to test.

Base URLhttps://sqatools.in/wp-json/sqa-api/v1
GET https://sqatools.in/wp-json/sqa-api/v1/users/1
200 OK
{
  "data": {
    "id": 1,
    "name": "Asha Verma",
    "username": "asha",
    "email": "asha@example.com",
    "role": "admin",
    "city": "Pune",
    "age": 34,
    "active": true,
    "created_at": "2025-01-15T09:30:00Z"
  }
}
  1. Pick an endpoint from the list below
  2. Press Send request; auth is added for you
  3. Compare your response with the expected one

Practice only: anything you create is visible to other learners until it expires. Never send real names, emails, passwords or other personal data.

Endpoints

Open endpoints. Hardcoded GET data never changes, so the same request always returns the same response.

Full endpoint reference (26 routes) and error format
MethodPathAuthWhat it does
GET/healthnoneService status and server time
GET/usersnoneUsers list: page, per_page, role, city, active, q, sort, order
GET/users/{id}noneOne user (Accept: application/xml for XML)
GET/users/{id}/ordersnoneOrders of one user (nested resource)
GET/productsnoneProducts: category, in_stock, min_price, max_price, sort, order
GET/products/{id}noneOne product with ETag (send If-None-Match for 304)
GET/ordersnoneOrders: status, user_id
GET/orders/{id}noneOne order with nested items, summary and shipping
ANY/status/{code}noneResponds with any status code from 200 to 599
GET/delay/{seconds}noneWaits 0-10 seconds before responding
ANY/echononeEchoes method, query, headers and body
ANY/redirectnoneRedirects to /echo (status=301, 302, 303, 307 or 308)
GET/rate-limitnone5 requests per minute, then 429 with Retry-After
POST/validate/usernoneValidates a user payload; 422 lists every field error
GET/schema/{name}noneJSON Schema: user, product, order, object, error, token
GETPOST/objectsnoneTemporary objects: list, create
GETPUTPATCHDELETE/objects/{id}noneTemporary object: read, replace or create, update, delete
GET/basic/profilebasicProfile behind HTTP Basic auth
GETPOSTPUTPATCHDELETE/basic/objects[/{id}]basicTemporary objects behind Basic auth
GET/apikey/profileapikeyProfile behind an API key
GETPOSTPUTPATCHDELETE/apikey/objects[/{id}]apikeyTemporary objects behind an API key
POST/auth/loginnoneGet a Bearer JWT and refresh token
POST/auth/refreshnoneSwap a refresh token for new tokens
POST/auth/logoutbearerRevoke the access token
GET/auth/mebearerWho the token belongs to
GETPOSTPUTPATCHDELETE/token/objects[/{id}]bearerTemporary objects; viewer role may only read

Every error has the same shape, which makes it easy to assert:

{"error": {"status": 422, "code": "validation_failed", "message": "1 field(s) failed validation.",
           "details": [{"field": "age", "message": "age is required: a whole number from 18 to 100 (not a string)."}]}}

How temporary objects work

Create

POST /objects gives a server id and 201 with a Location header. PUT /objects/your-id creates or replaces with your own id.

Fields

name (required, 1–100 characters), data (any JSON up to 5 KB), ttl (10–1800 seconds, default 600). Other fields give 422.

Expiry

Each object disappears after its ttl; then GET returns 404. DELETE returns 204, a second DELETE 404.

Versions

Every change adds 1 to version. Send the ETag in If-Match (else 412) or If-None-Match (304).

141 API testing scenarios

A ready-made test plan: functional, negative, boundary, auth, roles, headers, caching, performance and rate-limit cases. Press Try to run one in the console below (setup such as creating an object or waiting for expiry runs for you), or Run all to check them all.

Custom request consoleBuild any request yourself, or press Try on a scenario.
…/sqa-api/v1
Add auth:

The response appears here.

  1. Read hardcoded data (GET)
  2. Pagination, filtering, sorting and search
  3. HTTP methods, status codes and redirects
  4. Headers, content types and caching
  5. Request body validation (negative testing)
  6. Temporary objects: create, read, update, delete
  7. Basic authentication
  8. API key authentication
  9. Token (Bearer JWT) authentication
  10. Authorization (roles and permissions)
  11. Performance, timeouts and rate limits

Read hardcoded data (GET) (17)

#ScenarioRequestExpected
1Health check returns ok
Smoke test: the service is up.
GET /health200
2List all users
Default list with pagination metadata and headers.
GET /users200
3Get a single user by id
Verify exact field values.
GET /users/1200
4User that does not exist
Negative test: resource not found.
GET /users/999404
5Non-numeric user id
Path parameter type validation.
GET /users/abc400
6Zero as user id
Boundary value for an id.
GET /users/0400
7Nested resource: orders of a user
Parent/child resources.
GET /users/1/orders200
8Order with nested items and totals
Check nested objects, arrays and calculated values.
GET /orders/5001200
9Product has an ETag header
Response header assertions.
GET /products/101200
10Filter products by category
Query parameter filtering.
GET /products?category=books200
11Filter products by price range
Combined range filters.
GET /products?min_price=1000&max_price=5000200
12Invalid price range (min > max)
Cross-field validation of query parameters.
GET /products?min_price=5000&max_price=100400
13Unknown category value
Enum validation.
GET /products?category=toys400
14Filter orders by status
Filter on a status field.
GET /orders?status=delivered200
15JSON Schema for a user
Fetch a schema for contract testing.
GET /schema/user200
16Unknown schema name
Negative test on a lookup.
GET /schema/invoice404
17List every endpoint
API discovery (JSON escapes / as \/).
GET /endpoints200

Pagination, filtering, sorting and search (17)

#ScenarioRequestExpected
18Second page of users
Page 2 starts at the 6th record.
GET /users?page=2&per_page=5200
19Last page has the remaining records
Last-page boundary.
GET /users?page=3&per_page=5200
20Page beyond the last page
Out-of-range page returns an empty list, not an error.
GET /users?page=10200
21per_page above the maximum (51)
Upper boundary of page size.
GET /users?per_page=51400
22per_page at the maximum (50)
Boundary value that must pass.
GET /users?per_page=50200
23Page number zero
Lower boundary of page.
GET /users?page=0400
24Link header points to the next page
Hypermedia pagination headers.
GET /users?per_page=5200
25Filter users by role
Single filter.
GET /users?role=admin200
26City filter is case-insensitive
Case handling in filters.
GET /users?city=pune200
27Boolean filter active=false
Boolean query parameters.
GET /users?active=false200
28Invalid boolean value
Boolean validation.
GET /users?active=maybe400
29Combine two filters
AND logic between filters.
GET /users?role=admin&city=Chennai200
30Search by text
Free-text search.
GET /users?q=gupta200
31Search with no match
Empty result set.
GET /users?q=zzz200
32Sort by age descending
Sorting order.
GET /users?sort=age&order=desc&per_page=1200
33Sort by an unknown field
Whitelisted sort fields.
GET /users?sort=salary400
34Invalid sort order
Enum validation for order.
GET /users?order=up400

HTTP methods, status codes and redirects (18)

#ScenarioRequestExpected
35POST on a read-only resource
405 with an Allow header.
POST /users405
36DELETE on a read-only resource
Unsupported method.
DELETE /products/101405
37HEAD returns headers only
HEAD has the same headers as GET and no body.
HEAD /users/1200
38OPTIONS lists allowed methods
Pre-flight / discovery.
OPTIONS /users200
39Status code 201
Client handles 201 Created.
GET /status/201201
40Status code 400
Client handles 400 Bad Request.
GET /status/400400
41Status code 401
Client handles 401 Unauthorized.
GET /status/401401
42Status code 403
Client handles 403 Forbidden.
GET /status/403403
43Status code 404
Client handles 404 Not Found.
GET /status/404404
44Status code 409
Client handles 409 Conflict.
GET /status/409409
45Status code 500
Client handles 500 Internal Server Error.
GET /status/500500
46Status 503 with Retry-After
Back-off header on service unavailable.
GET /status/503503
47Status 204 has an empty body
No Content.
GET /status/204204
48Invalid status code
Validation of a path parameter.
GET /status/700400
49Redirect without following it
Assert the redirect itself.
GET /redirect302
50Follow a redirect
Client follows to the final response.
GET /redirect200
51307 keeps the POST method
307/308 preserve method and body.
POST /redirect?status=307200
52303 changes POST to GET
303 See Other always switches to GET.
POST /redirect?status=303200

Headers, content types and caching (7)

#ScenarioRequestExpected
53Ask for XML with the Accept header
Content negotiation.
GET /users/1200
54Unsupported Accept type
406 Not Acceptable.
GET /users/1406
55Custom request header is received
Verify headers and query reach the server.
GET /echo?source=test200
56Form-encoded body
Non-JSON bodies.
POST /echo200
57JSON body is echoed back
Round-trip a JSON payload.
PUT /echo200
58Conditional GET returns 304
ETag caching saves bandwidth.
GET /products/101304
59Responses are not cached
Cache-Control header check.
GET /health200

Request body validation (negative testing) (18)

#ScenarioRequestExpected
60Valid payload passes
Happy path.
POST /validate/user200
61Empty object: every required field fails
All errors are reported at once.
POST /validate/user422
62Wrong data type (age as text)
Type checking.
POST /validate/user422
63Boundary: age 17
Boundary value analysis (18 to 100).
POST /validate/user422
64Boundary: age 18
Boundary value analysis (18 to 100).
POST /validate/user200
65Boundary: age 100
Boundary value analysis (18 to 100).
POST /validate/user200
66Boundary: age 101
Boundary value analysis (18 to 100).
POST /validate/user422
67Invalid email format
Format validation.
POST /validate/user422
68Value outside the enum
Enum validation.
POST /validate/user422
69Unknown extra field
Strict schema rejects extra fields.
POST /validate/user422
70Name too short (1 character)
Minimum length.
POST /validate/user422
71Name too long (51 characters)
Maximum length.
POST /validate/user422
72Invalid phone number
Pattern validation.
POST /validate/user422
73Malformed JSON
Syntax errors give 400, not 500.
POST /validate/user400
74Wrong Content-Type
415 Unsupported Media Type.
POST /validate/user415
75Empty body
Missing payload.
POST /validate/user400
76JSON array instead of an object
Top-level type check.
POST /validate/user400
77Payload larger than 10 KB
413 Payload Too Large.
POST /objects413

Temporary objects: create, read, update, delete (24)

#ScenarioRequestExpected
78Create an object (POST)
201 Created with a Location header.
POST /objects201
79Create without the required name
Required field.
POST /objects422
80ttl below the minimum (5 seconds)
Boundary: minimum 10 seconds.
POST /objects422
81ttl above the maximum (2000 seconds)
Boundary: maximum 1800 seconds.
POST /objects422
82Client cannot choose the id on POST
Server-generated ids.
POST /objects422
83Read the created object
GET after POST.
GET /objects/{id}200
84List objects
The new object appears in the list.
GET /objects200
85Replace with PUT
Full update increments the version.
PUT /objects/{id}200
86Create with PUT and your own id
PUT to a new id creates it (upsert).
PUT /objects/my-{rand}201
87PUT without the required name
PUT needs the full representation.
PUT /objects/{id}422
88Body id differs from URL id
Consistency check.
PUT /objects/{id}422
89Partial update with PATCH
PATCH merges into existing data.
PATCH /objects/{id}200
90PATCH removes a key set to null
JSON merge patch semantics.
PATCH /objects/{id}200
91PATCH with an empty object
Nothing to update.
PATCH /objects/{id}422
92PATCH an object that does not exist
Update a missing resource.
PATCH /objects/missing-{rand}404
93Delete an object
204 No Content.
DELETE /objects/{id}204
94Read a deleted object
The object is gone after DELETE.
GET /objects/{id}404
95Delete the same object twice
Second DELETE returns 404.
DELETE /objects/{id}404
96Id too short
Path parameter format.
GET /objects/ab400
97Optimistic locking: stale If-Match
Prevent lost updates.
PUT /objects/{id}412
98Optimistic locking: current If-Match
Matching version is accepted.
PUT /objects/{id}200
99Conditional GET on an object
304 when unchanged.
GET /objects/{id}304
100Object vanishes after its ttl
Data expiry: created with ttl 10, read after 12 seconds.
GET /objects/{id}404
101Text with SQL and HTML is stored as plain text
Injection strings are data, never executed.
POST /objects201

Basic authentication (8)

#ScenarioRequestExpected
102Valid username and password
Authorization: Basic base64(user:pass).
GET /basic/profile basic200
103No credentials
401 with a WWW-Authenticate challenge.
GET /basic/profile401
104Wrong password
Invalid credentials.
GET /basic/profile basic_wrong401
105Malformed Basic header
Header that is not base64.
GET /basic/profile401
106Create an object with Basic auth
Write behind Basic auth.
POST /basic/objects basic201
107Create without credentials
Writes are protected too.
POST /basic/objects401
108Read an object with Basic auth
Read behind Basic auth.
GET /basic/objects/{id} basic200
109Collections are separate
An object created in /objects is not in /basic/objects.
GET /basic/objects/{id} basic404

API key authentication (6)

#ScenarioRequestExpected
110Valid key in the X-API-Key header
Header-based API key.
GET /apikey/profile apikey200
111Valid key as a query parameter
Query-string key (less secure: it ends up in logs).
GET /apikey/profile?api_key=sqa-key-12345200
112Missing API key
401 when no key is sent.
GET /apikey/profile401
113Wrong API key
403 when the key is not valid.
GET /apikey/profile apikey_wrong403
114Key sent in the wrong header
The key must be in X-API-Key.
GET /apikey/profile401
115Create an object with an API key
Write behind an API key.
POST /apikey/objects apikey201

Token (Bearer JWT) authentication (15)

#ScenarioRequestExpected
116Log in and get a token
Token issue.
POST /auth/login200
117Log in with a wrong password
Failed login.
POST /auth/login401
118Log in without fields
Required fields.
POST /auth/login422
119Token lifetime below 5 seconds
Boundary on expires_in.
POST /auth/login422
120Call a protected endpoint with the token
Authorization: Bearer <token>.
GET /auth/me admin200
121No token
401 without a token.
GET /auth/me401
122Garbage token
Not a JWT.
GET /auth/me401
123Wrong scheme (Token instead of Bearer)
Scheme must be Bearer.
GET /auth/me401
124Tampered token signature
Changing any character breaks the signature.
GET /auth/me tampered401
125Expired token
Token issued with expires_in 5, used after 7 seconds.
GET /auth/me expired401
126Log out revokes the token
Server-side logout.
POST /auth/logout admin204
127Token used after logout
Revoked tokens are rejected.
GET /auth/me revoked401
128Refresh the token
Get new tokens without the password.
POST /auth/refresh200
129Reuse a refresh token
Refresh tokens rotate: each works once.
POST /auth/refresh401
130Refresh without a token
Required field.
POST /auth/refresh422

Authorization (roles and permissions) (6)

#ScenarioRequestExpected
131Viewer can read objects
Read permission.
GET /token/objects viewer200
132Viewer cannot create objects
403 = authenticated but not allowed.
POST /token/objects viewer403
133Admin can create objects
Write permission.
POST /token/objects admin201
134Viewer cannot delete
Role check on DELETE.
DELETE /token/objects/{id} viewer403
135Admin can delete
Owner role succeeds.
DELETE /token/objects/{id} admin204
136Viewer token says can_write false
Claims in the response.
GET /auth/me viewer200

Performance, timeouts and rate limits (5)

#ScenarioRequestExpected
137Response time under 3 seconds
Simple SLA assertion.
GET /users200
138Delayed response (2 seconds)
Measure latency.
GET /delay/2200
139Delay above the limit
Validation on the delay.
GET /delay/11400
140Client timeout
Your client should give up after 2 seconds.
GET /delay/5client timeout
141Rate limit: 6th call in a minute
429 Too Many Requests with Retry-After.
GET /rate-limit429

Code examples

Every example below runs as-is against this API.

# 1. Read hardcoded data (no auth)
curl -i https://sqatools.in/wp-json/sqa-api/v1/users/1

# 2. Create a temporary object that lives 120 seconds
curl -i -X POST https://sqatools.in/wp-json/sqa-api/v1/objects \
  -H "Content-Type: application/json" \
  -d '{"name": "My test object", "data": {"qty": 2}, "ttl": 120}'

# 3. Basic auth
curl -i -u sqa_user:sqa@123 https://sqatools.in/wp-json/sqa-api/v1/basic/profile

# 4. API key
curl -i -H "X-API-Key: sqa-key-12345" https://sqatools.in/wp-json/sqa-api/v1/apikey/profile

# 5. Bearer token: log in, then send the access_token
curl -s -X POST https://sqatools.in/wp-json/sqa-api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username": "admin", "password": "admin@123"}'
curl -i -H "Authorization: Bearer <access_token>" https://sqatools.in/wp-json/sqa-api/v1/auth/me

Limits

  • 600 requests per minute per IP (then 429); /rate-limit allows 5 per minute on purpose.
  • Request bodies up to 10 KB (413 above that); data up to 5 KB.
  • Up to 300 live objects per collection; the oldest are removed first.
  • /delay/{seconds} waits at most 10 seconds. Responses are never cached.

Dummy Banking Website

Practice banking website for automation testing: net banking login with captcha and OTP, account statements, NEFT, RTGS, IMPS and UPI transfers, beneficiaries, bill payments, fixed deposits, loans, card controls and service requests, all with dummy data. Every element has a stable id or data-testid.

ISTQB Foundation Level Sample Paper 3 (CTFL v4.0, 40 Questions with Answers)

Sample paper 3 is the final full-length practice exam in this course. Its 40 questions are different from papers 1 and 2 and follow the official chapter and K-level split. If you score 32 or more here and on an official ISTQB sample exam, you are ready to book.

ISTQB CTFL › Sample paper 3 (40 questions) Syllabus v4.0.1 · updated 3 Nov 2026

How to use this paper
  • Time: 60 minutes (75 minutes with the non-native language extension).
  • Pass mark: 26 out of 40 (65%). Aim for 32 or more.
  • Split: chapter 1: 8 · chapter 2: 6 · chapter 3: 4 · chapter 4: 11 · chapter 5: 9 · chapter 6: 2 · K1: 8, K2: 24, K3: 8.
  • Written by SQA Tools; these are not official ISTQB questions.

Chapter 1: Fundamentals of Testing

Question 1 FL-1.5.2 (K1)

The whole team approach is a practice that comes from which development method?

  1. A. Waterfall
  2. B. Kanban
  3. C. Extreme Programming (XP)
  4. D. The V-model
Show answer

Answer: C. Extreme Programming (XP)

The syllabus states that the whole team approach comes from Extreme Programming.

Question 2 FL-1.2.2 (K1)

How are test results used in quality assurance?

  1. A. As feedback on how well the development and test processes are performing
  2. B. To fix individual defects in the code
  3. C. To decide the price of the product
  4. D. They are not used in QA at all
Show answer

Answer: A. As feedback on how well the development and test processes are performing

Both testing and QA use test results: testing to fix defects, QA to get feedback on how well the processes are working.

Question 3 FL-1.1.2 (K2)

After a developer fixes a defect, who should preferably perform the confirmation testing?

  1. A. The developer who fixed the defect
  2. B. The product owner
  3. C. Any automated tool, never a person
  4. D. The person who performed the test that originally found the failure
Show answer

Answer: D. The person who performed the test that originally found the failure

The syllabus states that confirmation testing is preferably done by the same person who performed the initial test.

Question 4 FL-1.2.1 (K2)

Why might testing be required on a medical device software project, beyond finding defects?

  1. A. To decide the marketing strategy
  2. B. To comply with regulatory standards and legal requirements
  3. C. To replace the development team’s code reviews
  4. D. To reduce the number of user stories
Show answer

Answer: B. To comply with regulatory standards and legal requirements

Testing may be required to meet contractual or legal requirements or to comply with regulatory standards, which is common for medical devices.

Question 5 FL-1.2.3 (K2)

A satellite’s software fails because radiation changes bits in its firmware memory. Which statement is correct?

  1. A. The failure was caused by a human error in the code
  2. B. The failure is a root cause
  3. C. Failures can also be caused by environmental conditions, as in this case
  4. D. This cannot be a failure because no defect was coded
Show answer

Answer: C. Failures can also be caused by environmental conditions, as in this case

Errors and defects are not the only causes of failures. Environmental conditions such as radiation or electromagnetic fields can also cause them.

Question 6 FL-1.3.1 (K2)

A form has 12 fields, each accepting 10 different values. A manager asks the team to test every combination before release. Which principle explains why this is not feasible?

  1. A. Exhaustive testing is impossible
  2. B. Tests wear out
  3. C. Defects cluster together
  4. D. Testing is context dependent
Show answer

Answer: A. Exhaustive testing is impossible

There are 10¹² combinations. Testing everything is not feasible except in trivial cases, so test techniques, prioritization and risk should focus the effort.

Question 7 FL-1.4.1 (K2)

Which task belongs to test completion?

  1. A. Defining and prioritising test conditions
  2. B. Comparing actual results with expected results
  3. C. Building and verifying the test environment
  4. D. Archiving testware that may be useful in future, and creating change requests for unresolved defects
Show answer

Answer: D. Archiving testware that may be useful in future, and creating change requests for unresolved defects

Test completion archives or hands over reusable testware, creates change requests for open defects, shuts down the environment, gathers lessons learned and writes the completion report.

Question 8 FL-1.5.3 (K2)

Which arrangement gives the HIGHEST level of test independence?

  1. A. The author tests their own code
  2. B. Testers from outside the organisation test the work product
  3. C. A peer from the same team tests the code
  4. D. Testers from another team inside the organisation test it
Show answer

Answer: B. Testers from outside the organisation test the work product

Independence rises from the author (none), to peers in the same team (some), to testers outside the team (high), to testers outside the organisation (very high).

Chapter 2: Testing Throughout the SDLC

Question 9 FL-2.1.3 (K1)

Which statement is true for TDD, ATDD and BDD?

  1. A. Tests are written after the code is complete
  2. B. Tests are defined before the code is written, applying early testing and shift left
  3. C. They can only be used in sequential development models
  4. D. They do not produce tests that can be automated
Show answer

Answer: B. Tests are defined before the code is written, applying early testing and shift left

In all three test-first approaches, tests are defined before the code, which implements early testing and follows shift left. They support iterative development, and tests may persist as automated tests.

Question 10 FL-2.1.2 (K1)

When should test analysis and design for a given test level begin?

  1. A. After the test level’s code is released to production
  2. B. Only when the test environment is ready
  3. C. After all other test levels are complete
  4. D. During the corresponding development phase of the SDLC
Show answer

Answer: D. During the corresponding development phase of the SDLC

Starting test analysis and design during the corresponding development phase follows the principle of early testing.

Question 11 FL-2.1.1 (K2)

In iterative and incremental development where increments are delivered frequently, what does testing need most?

  1. A. Fast feedback and extensive regression testing
  2. B. One large test phase at the end of the project
  3. C. No static testing
  4. D. Testing only at the acceptance level
Show answer

Answer: A. Fast feedback and extensive regression testing

Each iteration may involve static and dynamic testing at all test levels, and frequent delivery requires fast feedback and extensive regression testing.

Question 12 FL-2.2.1 (K2)

Before go-live, a bank’s operations team tests backup, restore and disaster recovery procedures. Which form of acceptance testing is this?

  1. A. User acceptance testing
  2. B. Contractual acceptance testing
  3. C. Operational acceptance testing
  4. D. Beta testing
Show answer

Answer: C. Operational acceptance testing

Operational acceptance testing checks the system’s readiness for operation, such as backup and restore and disaster recovery, by those who will run it.

Question 13 FL-2.2.2 (K2)

Which of the following is a non-functional quality characteristic listed in the syllabus (based on ISO/IEC 25010)?

  1. A. Functional correctness
  2. B. Portability (also known as flexibility)
  3. C. Functional completeness
  4. D. Decision coverage
Show answer

Answer: B. Portability (also known as flexibility)

The non-functional characteristics listed are performance efficiency, compatibility, usability, reliability, security, maintainability, portability and safety. Functional correctness and completeness are functional.

Question 14 FL-2.3.1 (K2)

Which factor typically determines the scope of maintenance testing?

  1. A. The number of testers on the team
  2. B. The programming language used
  3. C. The colour scheme of the user interface
  4. D. The degree of risk of the change
Show answer

Answer: D. The degree of risk of the change

The scope of maintenance testing typically depends on the degree of risk of the change, the size of the existing system and the size of the change.

Chapter 3: Static Testing

Question 15 FL-3.1.1 (K1)

What do work products need in order to be examined by static analysis tools?

  1. A. A structure against which they can be checked, such as models, code or text with a formal syntax
  2. B. An executable build
  3. C. A signed contract
  4. D. A completed test execution schedule
Show answer

Answer: A. A structure against which they can be checked, such as models, code or text with a formal syntax

Any readable work product can be reviewed, but static analysis needs a structure a tool can check against.

Question 16 FL-3.2.3 (K1)

Which review role decides who will be involved and organises when and where the review takes place?

  1. A. Manager
  2. B. Moderator
  3. C. Review leader
  4. D. Scribe
Show answer

Answer: C. Review leader

The review leader takes overall responsibility for the review, including who takes part and when and where it happens. The manager decides what is reviewed and provides resources.

Question 17 FL-3.1.3 (K2)

Which defect is typically easier or cheaper to find through static testing than through dynamic testing?

  1. A. A slow response under peak load
  2. B. A crash that appears after hours of continuous use
  3. C. A wrong result that only appears in production data
  4. D. A mismatch in the number, type or order of parameters in an interface specification
Show answer

Answer: D. A mismatch in the number, type or order of parameters in an interface specification

Incorrect interface specifications are listed among defects that static testing finds more easily or cheaply. The others need the software to run.

Question 18 FL-3.2.4 (K2)

Which statement about inspections is correct?

  1. A. They are led by the author
  2. B. The author cannot act as the review leader or the scribe, and metrics are collected to improve the process
  3. C. They do not follow a defined process
  4. D. Their only objective is to educate the reviewers
Show answer

Answer: B. The author cannot act as the review leader or the scribe, and metrics are collected to improve the process

Inspections are the most formal review type: they follow the complete generic process, collect metrics, and do not allow the author to be the review leader or scribe.

Chapter 4: Test Analysis and Design

Question 19 FL-4.1.1 (K2)

For which family of test techniques do test cases remain useful when the implementation changes but the required behaviour stays the same?

  1. A. Black-box test techniques
  2. B. White-box test techniques
  3. C. Code-coverage-based techniques
  4. D. None of them
Show answer

Answer: A. Black-box test techniques

Black-box techniques are based on the specified behaviour, independent of the implementation, so the tests stay useful if only the implementation changes.

Question 20 FL-4.2.1 (K3)

A username must be 6 to 12 characters long and contain letters only. A tester identifies five partitions: length below 6, length 6 to 12, length above 12, letters only, and contains non-letters. The tests are “abc”, “abcdefgh” and “abcd1234”. What equivalence partitioning coverage do they achieve?

  1. A. 60%
  2. B. 100%
  3. C. 80%
  4. D. 40%
Show answer

Answer: C. 80%

“abc” covers length below 6 and letters only; “abcdefgh” covers length 6 to 12; “abcd1234” covers length 6 to 12 and non-letters. Length above 12 is not covered, so coverage is 4 ÷ 5 = 80%.

Question 21 FL-4.2.2 (K3)

Parcel weights are entered in steps of 0.1 kg. 0.0 kg or less is invalid, 0.1 to 5.0 kg is standard, 5.1 to 20.0 kg is heavy, and above 20.0 kg is rejected. How many test values are needed for 100% 2-value boundary value coverage?

  1. A. 4
  2. B. 6
  3. C. 8
  4. D. 12
Show answer

Answer: B. 6

The boundary values are 0.0, 0.1, 5.0, 5.1, 20.0 and 20.1 (the outer ends of the lowest and highest partitions are unbounded). Each closest neighbour is itself one of these values, so 6 values give 100% coverage.

Question 22 FL-4.2.3 (K3)

A discount rule has two conditions: “customer is a senior citizen” and “customer is a student”. A customer cannot be both, so that combination is infeasible. How many test cases are needed for 100% decision table coverage of the full table?

  1. A. 4
  2. B. 2
  3. C. 1
  4. D. 3
Show answer

Answer: D. 3

Two Boolean conditions give 4 columns. Removing the infeasible column (senior and student both true) leaves 3 feasible columns, each needing a test.

Question 23 FL-4.2.4 (K3)

A state table has 3 states and 3 events, and 5 of its cells are valid transitions. Two test cases exercise all 5 valid transitions and attempt 2 invalid transitions. What all transitions coverage do they achieve?

  1. A. About 77.8%
  2. B. About 55.6%
  3. C. 100%
  4. D. About 71.4%
Show answer

Answer: A. About 77.8%

The table has 3 × 3 = 9 transitions (5 valid, 4 invalid). The tests cover 5 + 2 = 7 of 9, which is about 77.8%.

Question 24 FL-4.3.2 (K2)

Which of the following is a conditional branch?

  1. A. Straight-line code between two statements
  2. B. The decision to exit or continue a loop
  3. C. A comment in the source code
  4. D. A function’s name
Show answer

Answer: B. The decision to exit or continue a loop

Conditional branches are decision outcomes, such as the true or false result of an IF, a switch case, or exiting or continuing a loop. Straight-line code is an unconditional branch.

Question 25 FL-4.3.3 (K2)

Why do white-box coverage measures add value beyond black-box testing alone?

  1. A. They make black-box testing unnecessary
  2. B. They detect requirements that were never implemented
  3. C. They give an objective measure of code coverage and show where more tests are needed
  4. D. They remove the need for test design
Show answer

Answer: C. They give an objective measure of code coverage and show where more tests are needed

Black-box testing alone gives no measure of code coverage. White-box measures provide an objective measure and the information needed to add tests and increase confidence.

Question 26 FL-4.4.1 (K2)

What are fault attacks?

  1. A. A structured way to perform error guessing, using a list of possible errors, defects and failures
  2. B. Security attacks run by external hackers
  3. C. A type of static analysis tool
  4. D. A review type led by the author
Show answer

Answer: A. A structured way to perform error guessing, using a list of possible errors, defects and failures

Fault attacks implement error guessing: the tester builds or obtains a list of likely errors, defects and failures and designs tests to expose them.

Question 27 FL-4.4.3 (K2)

Why should checklists used in checklist-based testing be updated regularly?

  1. A. Because checklists must contain every possible test
  2. B. Because longer checklists are always better
  3. C. Because checklists must include items that tools can check automatically
  4. D. Because items lose effectiveness as developers learn to avoid those errors, and new high-severity defects may need new entries
Show answer

Answer: D. Because items lose effectiveness as developers learn to avoid those errors, and new high-severity defects may need new entries

Checklist entries wear out as developers learn, and new important defects should be added, so checklists are updated from defect analysis while avoiding excessive length.

Question 28 FL-4.5.1 (K2)

In the “3 C’s” of user stories, what is the Confirmation?

  1. A. The card or electronic board entry
  2. B. The acceptance criteria
  3. C. The conversation about how the software will be used
  4. D. The developer’s code review
Show answer

Answer: B. The acceptance criteria

Card is the medium, Conversation explains how the software will be used, and Confirmation is the acceptance criteria.

Question 29 FL-4.5.3 (K3)

User story: “As a shopper, I want free delivery on orders of ₹499 or more.” Acceptance criteria: (1) orders of ₹499 or more get free delivery; (2) orders below ₹499 pay a ₹49 delivery fee. Which pair of ATDD test cases covers both criteria without duplication?

  1. A. A ₹600 order gets free delivery; a ₹700 order gets free delivery
  2. B. A ₹100 order pays ₹49; a ₹200 order pays ₹49
  3. C. A ₹499 order gets free delivery; a ₹498 order pays ₹49
  4. D. A ₹499 order on the website gets free delivery; a ₹499 order on Android gets free delivery
Show answer

Answer: C. A ₹499 order gets free delivery; a ₹498 order pays ₹49

Each acceptance criterion needs a test, and no two tests should describe the same characteristic. Option C covers both criteria (here at the boundary). A, B and D each test only one criterion twice.

Chapter 5: Managing the Test Activities

Question 30 FL-5.2.1 (K1)

Which two factors determine the risk level?

  1. A. Test coverage and defect density
  2. B. Budget and schedule
  3. C. Number of testers and number of test cases
  4. D. Risk likelihood and risk impact
Show answer

Answer: D. Risk likelihood and risk impact

Risk level is expressed by the likelihood of the risk occurring and its impact (harm) if it occurs.

Question 31 FL-5.1.3 (K2)

When can running out of time or budget be an acceptable reason to stop testing?

  1. A. When stakeholders have reviewed and accepted the risk of going live without further testing
  2. B. Never; all exit criteria must always be met
  3. C. Only if no defects have been found
  4. D. Only in sequential development models
Show answer

Answer: A. When stakeholders have reviewed and accepted the risk of going live without further testing

Running out of time or budget can be a valid exit criterion, even if other exit criteria are not met, provided stakeholders have reviewed and accepted the risk.

Question 32 FL-5.1.4 (K3)

Three-point estimates for a test task are: optimistic a = 6, most likely m = 12 and pessimistic b = 30 hours. What are the estimate E and the standard deviation SD?

  1. A. E = 12, SD = 4
  2. B. E = 16, SD = 6
  3. C. E = 14, SD = 4
  4. D. E = 14, SD = 24
Show answer

Answer: C. E = 14, SD = 4

E = (6 + 4 × 12 + 30) / 6 = 84 / 6 = 14 hours. SD = (30 − 6) / 6 = 4 hours. So the estimate is 14 ± 4 hours.

Question 33 FL-5.1.5 (K3)

Requirement priorities are: R-A high, R-B medium, R-C low. Test T1 covers R-C, T2 covers R-A, T3 covers R-B, and T4 covers R-A but needs data created by T1. Using requirements-based prioritization, which order is correct?

  1. A. T2, T4, T1, T3
  2. B. T2, T1, T4, T3
  3. C. T2, T3, T1, T4
  4. D. T1, T2, T3, T4
Show answer

Answer: B. T2, T1, T4, T3

Tests for the high-priority requirement (T2, T4) go first, but T4 depends on T1, so T1 must run before T4. T3 (medium) follows. A breaks the dependency, and C delays a high-priority test unnecessarily.

Question 34 FL-5.1.7 (K2)

Which tests belong to testing quadrant Q2 (business facing, supporting the team)?

  1. A. Component tests run in CI
  2. B. Smoke tests and performance tests
  3. C. Exploratory and usability testing
  4. D. Functional tests, examples, user story tests and API tests
Show answer

Answer: D. Functional tests, examples, user story tests and API tests

Q2 contains functional tests, examples, user story tests, user experience prototypes, API testing and simulations, which check acceptance criteria.

Question 35 FL-5.2.2 (K2)

Which is a possible consequence when a PRODUCT risk occurs?

  1. A. The project schedule is delayed
  2. B. User dissatisfaction and loss of reputation
  3. C. The budget is overrun
  4. D. The project scope is reduced
Show answer

Answer: B. User dissatisfaction and loss of reputation

Product risks affect product quality and can lead to user dissatisfaction, loss of revenue, trust or reputation, and more. Schedule, budget and scope impacts describe project risks.

Question 36 FL-5.3.2 (K2)

What is the main purpose of a test progress report?

  1. A. To support ongoing test control with enough information to adjust the schedule, resources or plan
  2. B. To archive testware at the end of the project
  3. C. To replace the test plan
  4. D. To list lessons learned after the release
Show answer

Answer: A. To support ongoing test control with enough information to adjust the schedule, resources or plan

Progress reports support ongoing test control. Archiving and lessons learned belong to test completion.

Question 37 FL-5.4.1 (K2)

How does configuration management make it possible to reproduce earlier test results?

  1. A. By deleting old versions of test items
  2. B. By assigning priorities to defects
  3. C. By recording changed configuration items for each baseline, so a previous baseline can be restored
  4. D. By running all regression tests automatically
Show answer

Answer: C. By recording changed configuration items for each baseline, so a previous baseline can be restored

CM records changes when a new baseline is created, so the team can revert to a previous baseline and reproduce earlier results.

Question 38 FL-5.5.1 (K3)

The company name is misspelled on the home page of a banking website. Nothing else is affected. Which classification is most appropriate in the defect report?

  1. A. High severity, low priority
  2. B. High severity, high priority
  3. C. Low severity, low priority
  4. D. Low severity, high priority
Show answer

Answer: D. Low severity, high priority

Severity is the impact on stakeholders or requirements, which is low here because nothing functional breaks. Priority is how soon to fix it, which is high because it is very visible and harms the brand.

Chapter 6: Test Tools

Question 39 FL-6.1.1 (K2)

The team uses containers so that every tester gets an identical test environment. Which type of tool is this?

  1. A. Test design and implementation tool
  2. B. Static testing tool
  3. C. Tool supporting scalability and deployment standardisation
  4. D. Test management tool
Show answer

Answer: C. Tool supporting scalability and deployment standardisation

Virtual machines and containerisation tools are listed as tools supporting scalability and deployment standardisation.

Question 40 FL-6.2.1 (K1)

A team wants to automate a one-off exploratory usability check of a new screen. Which risk of test automation does this illustrate?

  1. A. Using a test tool when manual testing is more appropriate
  2. B. Reduced test execution time
  3. C. Easier access to information about testing
  4. D. Prevention of simple human errors
Show answer

Answer: A. Using a test tool when manual testing is more appropriate

Using a tool where manual testing is more appropriate is a listed risk. The other options are listed benefits.

How did you do?

Score What it means Next step
32 to 40 Exam-ready Take one official ISTQB sample exam (A, B, C or D on istqb.org) under timed conditions, then book your exam
26 to 31 Pass, but no margin Review the explanations, re-read the matching syllabus sections and retry paper 1
Below 26 Not yet Follow the 4-week study plan from the start

Answer key

Count one point per correct answer. 26 or more out of 40 is a pass (65%). Aim for 32 or more before you book the real exam.

QAnswerLearning objectiveQAnswerLearning objective
1CFL-1.5.2 (K1)21BFL-4.2.2 (K3)
2AFL-1.2.2 (K1)22DFL-4.2.3 (K3)
3DFL-1.1.2 (K2)23AFL-4.2.4 (K3)
4BFL-1.2.1 (K2)24BFL-4.3.2 (K2)
5CFL-1.2.3 (K2)25CFL-4.3.3 (K2)
6AFL-1.3.1 (K2)26AFL-4.4.1 (K2)
7DFL-1.4.1 (K2)27DFL-4.4.3 (K2)
8BFL-1.5.3 (K2)28BFL-4.5.1 (K2)
9BFL-2.1.3 (K1)29CFL-4.5.3 (K3)
10DFL-2.1.2 (K1)30DFL-5.2.1 (K1)
11AFL-2.1.1 (K2)31AFL-5.1.3 (K2)
12CFL-2.2.1 (K2)32CFL-5.1.4 (K3)
13BFL-2.2.2 (K2)33BFL-5.1.5 (K3)
14DFL-2.3.1 (K2)34DFL-5.1.7 (K2)
15AFL-3.1.1 (K1)35BFL-5.2.2 (K2)
16CFL-3.2.3 (K1)36AFL-5.3.2 (K2)
17DFL-3.1.3 (K2)37CFL-5.4.1 (K2)
18BFL-3.2.4 (K2)38DFL-5.5.1 (K3)
19AFL-4.1.1 (K2)39CFL-6.1.1 (K2)
20CFL-4.2.1 (K3)40AFL-6.2.1 (K1)

This paper: 40 questions (8 × K1, 24 × K2, 8 × K3).

This study material is written by SQA Tools and is based on the ISTQB® Certified Tester Foundation Level Syllabus v4.0.1 (© International Software Testing Qualifications Board and the syllabus authors). ISTQB® is a registered trademark of the International Software Testing Qualifications Board. This page is not affiliated with or endorsed by ISTQB. Always check the official CTFL page for the latest syllabus and exam rules.