Test Design Techniques with AI: Boundaries, Tables and States
Ask AI for “test cases” and you often get a random list. Ask it to apply a named technique and the result becomes far more complete and easier to check. In this lesson you will use four classic test design techniques with AI: equivalence classes, boundary values, decision tables and state transitions.
📖 What You’ll Learn
- Four test design techniques in plain language
- How to choose the right technique for a feature
- How to ask AI to apply each one
- How to check that the output is complete
💡 Why Use Test Design Techniques with AI?
Techniques give both you and the AI a clear method. You can also check the result, because each technique has rules. If you know the rules, you can spot a missing test straight away.
🔍 Equivalence Classes
Explain Like I’m 5: Equivalence Classes
Imagine: You sort sweets by colour. You only taste one red sweet, because the other red ones should be the same.
What it really means: Group inputs that should behave alike, and test one from each group.
In testing: For ages 18 to 60, test one valid age and one from each invalid group.
Rule: an age field accepts 18 to 60.
| Group | Example value | Expected |
|---|---|---|
| Below the range | 10 | Rejected |
| Inside the range | 35 | Accepted |
| Above the range | 75 | Rejected |
🧩 Boundary Values
Explain Like I’m 5: Boundary Values
Imagine: A ride says you must be as tall as the line. The arguments happen with children right at the line.
What it really means: Bugs often hide at the edges of a range.
In testing: Test just below, on and just above each limit.
For the same rule, test 17, 18, 60 and 61. These four values catch common mistakes, such as a developer writing “greater than 18” instead of “18 or more”.
🛠️ Decision Tables
Explain Like I’m 5: Decision Tables
Imagine: “If it is sunny and you finished your homework, you can play outside.” Each mix of answers gives one result.
What it really means: A decision table lists every combination of conditions and its result.
In testing: Use it when several rules work together.
Rule: members who spend more than 1,000 get a discount of 10%. Everyone else gets no discount.
| Rule | Member? | Order above 1,000? | Discount |
|---|---|---|---|
| 1 | Yes | Yes | 10% |
| 2 | Yes | No | None |
| 3 | No | Yes | None |
| 4 | No | No | None |
With two yes-or-no conditions, there are four combinations. With three, there are eight. Ask the AI to show its count, so you can confirm that nothing is missing.
📌 State Transitions
Explain Like I’m 5: State Transitions
Imagine: A traffic light goes from green to yellow to red. It should not jump from red straight to yellow in most places.
What it really means: Some things move through set stages, and only certain moves are allowed.
In testing: Test allowed moves and blocked moves.
Example: an order can move from Placed to Shipped to Delivered. A Placed order can also be Cancelled.
| From | Action | To | Allowed? |
|---|---|---|---|
| Placed | Ship | Shipped | Yes |
| Placed | Cancel | Cancelled | Yes |
| Shipped | Deliver | Delivered | Yes |
| Delivered | Cancel | Delivered | No |
Blocked moves are often forgotten, so ask for them by name.
🔑 Choosing the Right Technique
| Feature has… | Start with |
|---|---|
| Input fields with groups of values | Equivalence classes |
| Numeric, date or length limits | Boundary values |
| Several rules that combine | Decision table |
| Statuses or a workflow | State transitions |
Most real features need more than one. The ISTQB Foundation guide covers these techniques in more depth.
Do the small version first
Work out one technique by hand before you ask AI. You can only judge an answer that you understand.
🧪 Try It Yourself
- Use this rule: a coupon works for orders from 500 to 5,000, for logged-in users only.
- Write the boundary values and combinations yourself.
- Run the prompt below.
- Check for 499, 500, 5,000 and 5,001.
- Check that logged-in and guest users are both covered. Then try another rule from the Automation Practice Page.
📋 Ready-to-Copy Prompt
You are a QA engineer skilled in test design techniques.
Business rules:
[paste rules]
Apply these techniques in order:
1. Equivalence classes for each input
2. Boundary values for each limit
3. A decision table for combined rules, stating the total combinations
4. State transitions if the feature has statuses, including blocked moves
For each test, show ID, Technique, Input or Condition, Expected Result
and the Rule it comes from.
Rules:
- Use only the business rules above.
- If an expected result is not defined, write "NEEDS CONFIRMATION".
- Do not merge techniques or skip one without saying why.
⚠️ Common Mistakes
- Asking for “all test cases” without naming a technique
- Testing only the limit and not the values on each side
- Forgetting blocked state changes
- Not counting the combinations in a decision table
- Trusting expected results that the rules do not support
🎯 Key Takeaways
- Named techniques make AI output more complete and easier to check.
- Equivalence classes reduce repeated tests.
- Boundary values target the edges where bugs often hide.
- Decision tables and state transitions handle rules and workflows.
🎤 Interview Questions
1. What is equivalence partitioning?
Model answer: It divides input data into groups that the system should treat the same way, then tests a representative from each group. This reduces repeated tests while still covering valid and invalid behaviour.
2. Give boundary values for a field that accepts 1 to 100.
Model answer: I would test 0, 1, 100 and 101. Some teams add 2 and 99 for three-value boundary analysis. The main purpose is to check behaviour just outside and exactly at the limits.
3. When would you use a decision table?
Model answer: I use one when an outcome depends on combinations of conditions, such as discounts or eligibility rules. It shows every combination clearly and exposes cases that the requirements do not define.
4. What is state transition testing?
Model answer: It tests how a system moves between states in response to events. I cover valid transitions and also invalid ones, such as trying to cancel an order that has already been delivered.
5. How do you use AI with test design techniques?
Model answer: I name the technique and give the rules, then ask it to show its working, such as the number of combinations. I verify the boundaries and expected results myself, because it can skip cases or invent behaviour.
📝 Assignment
Pick a feature with at least one limit and two combined rules. Create boundary tests and a decision table by hand, then use the prompt. Record any test that you missed and any test the AI missed.
❓ FAQ
Do I need to test every combination?
For a small table, yes. Large numbers of combinations need a risk-based choice or methods such as pairwise testing, which later lessons can build on.
Are these techniques still useful with AI?
Yes, even more so. They give you a clear way to direct the AI and judge what it produces.
🚀 Next Steps
Well done on finishing this lesson. Complete the assignment, then continue with Synthetic Test Data with AI: Create Safe, Realistic Data.