QA Interview Hub · Knowledge base · Quizzes · Українська

QA Fundamentals

Test design techniques

how to choose what to test

What are equivalence classes?

An equivalence class is a group of values the system handles by one rule, so one representative per class is enough. For an amount from 1 to 10,000 these are a value in range, below 1, above 10,000 and non-numeric input: text, an empty field. Invalid classes are tested one per test, because the first validation error masks the rest, and boundary values are added near the edges.

QA Fundamentals · Test design techniques

The amount field accepts 1–10,000. How many values do you enter instead of trying all ten thousand?

The transfer form has an "Amount" field, and the requirements say: from 1 to 10,000 UAH. You cannot try every value, and testing only "500" and "1000" is unreliable: all those checks pass the same branch of code. The equivalence partitioning technique answers which values are enough and why exactly those.

How it works and why

The idea is simple: values that the system handles by one rule belong to one class. If the code implements "an amount from 1 to 10,000 is accepted, the rest is rejected", then 500 and 7,777 go through the same branch. A test with the second value gives no new information, so one representative per class is enough. In ISTQB CTFL v4.0 (4.2.1), 100% coverage means every class, invalid ones included, is covered by at least one test. A separate practical rule: one test does not combine several invalid values.

The last rule explains why invalid classes are checked one at a time. If one test enters both an amount of 0 and an empty date and the system shows a single error, you will not know whether it handles the second one. The first validation "masks" the rest.

Three numeric classes and one representative each

invalidvalidinvalid < 1 1 … 10,000 > 10,000 05,00020,000 Separate classes: “abc”, empty, spaces
Figure 1. The amount field splits into three numeric classes; non-numeric input forms its own invalid classes.

Example: from classes to tests

First list all the classes, not only the numeric ones. Then give each a representative and an expected result, taken from the requirements and not from what the system did.

ClassRepresentativeExpected
Valid: 1–10,0005,000Transfer accepted
Below 10Minimum error
Above 10,00020,000Maximum error
Negative (if a separate rule checks the minus sign)-100Format error: negative amount
Too many decimals100.555Rejected or rounded, as the requirements say
Not a numberabcFormat error
Empty field(nothing)Field is required

Seven tests cover seven classes. A negative value formally lies in the class "below 1"; it is a class of its own only when the system handles it by a different rule, because classes must not overlap. The weak set "100, 500, 1000, 5000" also has four values, but all of them lie in one class, so six of the seven classes stay unchecked.

A set of values: weak and strong

Typical

Four values in one class

100, 500, 1000, 5000: all valid. Plenty of tests, and not one rejection branch is checked.

Better

One value from each class

5,000, 0, 20,000, -100, 100.555, abc, empty. Each test checks a separate handling branch.

Figure 2. How many tests matters less than how many different classes they cover.

For a form with several fields, the valid representatives of different fields are merged into one "happy" test, and an invalid value is always entered in only one field at a time.

Limits and alternatives

  • Classes come from the requirements and from what is known about the implementation. If the code has a hidden branch (for example, amounts above 5,000 need an SMS confirmation), that is a separate class, and it is visible only from clarifications to the requirements.
  • One representative per class is not enough when the class edges are unclear or the code is wrong near the edges. That is why the technique is almost always combined with boundary value analysis.
  • When the result depends on a combination of fields, the classes of single fields do not settle it. A decision table or pairwise helps here.

Typical mistakes

  • Taking values from one class. Many tests do not mean wide coverage.
  • Combining several invalid values in one test. The first validation error hides the rest.
  • Forgetting non-numeric classes. Empty, spaces, text and a very long number often break first.
  • Inventing the expected result after the run. Then the test confirms behaviour instead of a requirement.

Check yourself

The "quantity" field accepts 1 to 99. How many numeric classes are there and what are the representatives?

Answer

Three numeric classes: below 1 (for example 0), from 1 to 99 (for example 50) and above 99 (for example 150). Other invalid classes are added to them: text, an empty field, a fractional value. The total is not three tests but as many as there are different handling rules.

Why enter an invalid value in only one field per test?

Answer

If one test has two invalid fields, the system often shows only the first error. You will not learn whether the second field is checked, and you will not understand which error fired. A separate test gives an unambiguous conclusion.

All your values 100, 500, 1000, 5000 passed. Can you say the field is tested?

Answer

No. They all come from one valid class, so the rejection branches (below 1, above 10,000, text, empty) were never executed. One class out of several is covered.

In an interview. Junior: I split the input into groups where the system behaves the same and take one representative from each, valid and invalid. For an amount from one to ten thousand that means a value inside the range, below, above, text and an empty field. This shortens the number of tests without losing coverage. Middle/Senior: I derive the classes from the requirements and the known implementation, look for hidden branches (limits, confirmations) and ask the analyst about them. I check invalid classes one per test so one error does not mask another, and I add boundary values near the edges, because a single representative does not catch a "greater than or equal" mistake.

What is boundary value analysis?

Boundary value analysis tests the edge of a range and the values next to it, because errors such as < instead of <= show only there. The 2-value approach takes a boundary and the closest value on the other side, and 3-value adds the neighbour inside: for 1 to 10,000 that is 0, 1, 2, 9,999, 10,000, 10,001. The step depends on the type, and inclusive boundaries are clarified in requirements.

QA Fundamentals · Test design techniques

A "1 to 10,000" field rejects exactly 10,000. Which test would catch it?

A tester checked the amount field with 500, 5,000 and 9,000: all green. In production a customer cannot transfer exactly 10,000, because the developer wrote amount < 10000 instead of <=. Equivalence classes would not have found it: 5,000 and 10,000 lie in one class. That is what boundary value analysis (BVA) is for.

How it works and why

Bugs live where a condition changes the outcome. A comparison operator gives the same result for all values except those right next to the boundary. This is where developers confuse < and <=, count from zero or from one, round the wrong way. So we test the boundary itself and the values next to it.

There are two approaches, and this site follows one convention. 2-value BVA: for each boundary take the value on the boundary and the nearest value on the other side, four values for a range. 3-value BVA: for each boundary take the value below, on and above it, that is six values per range (two boundaries by three).

Six values for the range 1–10,000

lower boundaryupper boundary 0No 1Yes 2Yes 9,999Yes 10,000Yes 10,001No
Figure 1. Three values at each boundary: below, on, above. The line shows where the outcome changes.

Example: which value catches which bug

The requirement: an amount from 1 to 10,000 inclusive. The developer wrote a condition with two off-by-one errors:

// requirement: 1 <= amount <= 10000
if (amount > 1 && amount < 10000) accept();
else reject();

Let us see how this code reacts to the values of the 3-value set and compare with the expected result:

ValueExpectedCodeMatch
0rejectrejectyes
1acceptrejectno, bug
2acceptacceptyes
9,999acceptacceptyes
10,000acceptrejectno, bug
10,001rejectrejectyes

The values 500, 5,000, 9,000 would pass without a single failure. Only two of the six find these bugs. 0 and 10,001 are needed for the opposite mistakes: amount >= 0 would accept 0, and amount <= 10001 would accept 10,001. The inner neighbours 2 and 9,999 come from 3-value BVA: by ISTQB they catch, for example, a limit check written as amount == 10000 instead of amount <= 10000, which the 2-value set misses.

2-value or 3-value

2-value: 4 values

0, 1, 10,000, 10,001. The boundary and the nearest value outside the range. Faster, catches typical operator mistakes.

3-value: 6 values

0, 1, 2, 9,999, 10,000, 10,001. Adds the neighbours inside. Wider, for when the boundary is shifted or the behaviour next to it is risky too.

Figure 2. Both approaches are legitimate, the choice depends on risk and time. On this site 3-value counts six values per range.

Money, lengths, dates

The step between neighbouring values depends on the type. For integers it is 1, for money 0.01, so the boundaries are 0.99, 1.00, 1.01 and 9,999.99, 10,000.00, 10,000.01. Separately, ask how the system rounds 10,000.004: the requirements must say whether it is 10,000.00 (accept) or a rejection.

Boundaries exist outside numeric fields too: a password length of 8–64 characters, a file size of 5 MB, the end of a month and 29 February, the time 23:59:59, a pagination page size, a daily limit. For a file size, clarify what "5 MB" means: 5,000,000 or 5,242,880 bytes. These differ, and the boundary sits elsewhere.

Limits and alternatives

  • The technique works for ordered values: numbers, dates, lengths, counts. A list of options (countries, account types) has no boundary, and equivalence classes apply there.
  • Whether the boundaries are inclusive (≤ or <) must be stated in the requirements. If it is not, that is a question to the analyst, not a guess.
  • BVA complements classes and does not replace them: classes give a representative from the middle of the range, BVA gives the values on the edges.

Typical mistakes

  • Testing only the lower boundary. The upper one carries the same risks.
  • Taking the boundary from a hint in the interface. The hint may differ from the requirements and the code.
  • Not checking values outside the range. It is 0 and 10,001 that show the rejection works.
  • Computing boundaries for decimals as for integers. The neighbour is then not 10,001 but 10,000.01.

Check yourself

A password must have 8 to 64 characters. Which length values for 2-value BVA?

Answer

7, 8, 64 and 65: the boundaries 8 and 64 and the nearest values outside the range. For 3-value, 9 and 63 are added, six values in total.

Why would the value 5,000 not find the error amount < 10000?

Answer

Because 5,000 is far from the boundary, and both operators, < and <=, give the same result for it. They differ only at the boundary itself, which is 10,000.

A price is accepted from 0.01 to 999.99. Which six values for 3-value?

Answer

0.00, 0.01, 0.02 and 999.98, 999.99, 1000.00. The step for money is 0.01, so neighbouring values differ by one cent.

In an interview. Junior: Errors most often sit at boundaries, so I test the boundary itself and the values next to it. For a range of one to ten thousand, in the three-value approach that is 0, 1, 2 and 9,999, 10,000, 10,001. For money I add cents. Middle/Senior: I clarify whether the boundaries are inclusive, pick 2-value or 3-value by risk, and for decimals I compute the step of the type. Separately I look for non-obvious boundaries: lengths, file sizes, dates, limits. I do boundaries and classes together, because classes give the middle of the range and BVA the edges.

What is a decision table and when do you use it?

A decision table lists combinations of conditions with matching actions, so it is used when the result depends on several conditions together. Each column is a rule and a separate test, n binary conditions give 2 to the power of n columns, and coverage is measured in columns. The table is collapsed with a dash only where a condition does not affect the result. It exposes combinations with no defined action.

QA Fundamentals · Test design techniques

A transfer is declined because funds are low and the limit is used up. Which error to show? The requirements say nothing.

The transfer rule sounds simple: the account is active, there are enough funds, the limit is not exceeded, so the transfer goes through. In practice each condition may be met or not, and the system has to react correctly to every combination. Neither classes nor boundaries help here: they work with one field, while the result depends on several conditions together. That is what a decision table is for.

How it works and why

The table has two blocks of rows: conditions (what we check) and actions (what must happen). Each column is one rule: a specific combination of condition values and the matching action. For n binary conditions the full table has 2n columns: 3 conditions give 8, 5 give 32, 10 give 1,024.

The benefit is that the table forces you to list the combinations exhaustively, and gaps in the requirements show at once: either a column has no described action, or two columns contradict each other. In ISTQB, coverage is measured in columns: how many rules are checked by at least one test.

The table is often collapsed. If the result of a rule does not depend on a condition, it is replaced by "—" ("do not care") and several columns merge into one. Below the account is inactive, and then the state of funds and the limit changes nothing.

A decision table for a transfer

#Account activeFunds enoughLimit okResult
1No——Declined: account
2YesNoYesDeclined: funds
3YesYesNoDeclined: limit
4YesNoNo?
5YesYesYesTransfer
Figure 1. Eight combinations are collapsed into five rules (rows here, columns in the classic layout). Rule 4 has no action in the requirements: a question for the analyst.

Example: from the table to test cases

Each column becomes a test with concrete data. For the transfer it may look like this:

  • Rule 5. The account is active, the balance is 5,000, the daily limit is 10,000, the transfer is 1,000: we expect success and a debit.
  • Rule 2. The account is active, the balance is 500, the transfer is 1,000: a "not enough funds" decline, the balance is unchanged.
  • Rule 3. The balance is 50,000, but 9,500 was already transferred today, the transfer is 1,000: a decline by the limit.
  • Rule 1. A blocked account: a decline regardless of the balance and the limit.
  • Rule 4. Both the balance and the limit are insufficient: what does the system show?

Rule 4 is the most valuable result. Without the table it is easy to miss, and in production the user would see either a random one of two errors or a generic "something went wrong". The tester goes to the analyst with a concrete question: which error takes priority, should both be shown.

The full table and the collapsed one

Full: 8 columns

All combinations of three conditions. Nothing is lost, but in four columns the result is the same (the account is inactive).

Collapsed: 5 columns

Where a condition has no effect, "—" stands. Fewer tests, and every rule has its own reason.

Figure 2. Collapsing saves tests only where the independence of a condition is confirmed by the requirements.

Limits and alternatives

  • With 5-6 conditions the table grows. Then it is split into several tables by blocks of rules, or the combinations are chosen by risk or with pairwise.
  • Conditions must be unambiguous (yes / no), not "a reasonable amount". An unclear condition is first broken into checkable ones: a comparison with a threshold, the presence of a flag.
  • Some combinations are impossible (for example, "first transfer" and "transfer history is not empty"). They are marked as unreachable, not silently deleted.
  • When the result depends on the order of events, state transitions are needed instead of a table.

Typical mistakes

  • Checking only the happy column. Every decline is a rule too, with its own action.
  • Collapsing with "—" where the condition does matter. The test for a real difference is lost.
  • Mixing conditions and actions in one row. A condition describes input, an action describes output.
  • Inventing the missing rule. An unknown result is a question to the requirements, not the tester's choice.

Check yourself

There are four binary conditions. How many columns does the full decision table have?

Answer

16, that is 2 to the power of 4. The table can be collapsed by merging rules where a condition does not affect the result, but this must be confirmed by the requirements first.

What does "—" in a condition cell mean and how is it different from "No"?

Answer

"—" means the value of the condition does not matter for this rule: the result is the same for both "Yes" and "No". "No" is a concrete value that affects the result. So replacing "No" with "—" without grounds wrongly removes a test.

The table revealed a combination with no action in the requirements. What do you do?

Answer

I do not invent the expected result. I formulate a question to the analyst or product owner with a concrete data example and add the rule to the table when I get an answer. Without an answer, the test stays an open question in the requirements.

In an interview. Junior: I use a decision table when the result depends on a combination of conditions. I list all combinations and the expected action, and check each column with a separate test. Often this immediately gives a question for the requirements. Middle/Senior: I collapse the table only when the independence of conditions is confirmed, and I mark unreachable combinations (N/A) or remove them with a note, and leave them out of coverage. For large sets of conditions I split the table or choose combinations by risk. I treat coverage as the share of columns checked by tests, and I record rules without a defined action separately.

What is state transition testing?

State transition testing checks how an object moves between states through events, including transitions that should not exist. The model has states, events, transitions and actions, and coverage grows from all states to all valid transitions and all transitions, including invalid ones. Forbidden state and event pairs become negative tests, and side effects and server-side protection are checked apart from the UI.

QA Fundamentals · Test design techniques

The order is already delivered. What happens if the customer presses "Cancel"?

A tester walked the order path from creation to delivery, and everything worked. But what happens if, after delivery, a cancel request is sent straight to the API, or "Pay" is clicked twice? For entities that pass through states (an order, a payment, an account, a ticket), errors most often hide not in the states themselves but in the transitions between them, especially those that should not exist. This is the area of state transition testing.

How it works and why

The model has four parts: a state (where the object is now), an event (what happened: payment, shipment), a transition (state → event → new state) and an action (a side effect: an email, a debit). Sometimes a transition also has a guard: cancelling is allowed if the order has not been shipped yet.

Order states and allowed transitions

New Paid Shipped Delivered pay ship deliver Cancelled cancel cancel only from New and Paid
Figure 1. The diagram shows only the allowed transitions. Everything missing from it must be checked as forbidden.

ISTQB defines three growing levels of coverage: all states (every state visited), all valid transitions (every arrow walked) and all transitions, including invalid ones. The last level is the most expensive, but it is the one that finds errors not visible on the diagram.

Example: the state table

Invalid transitions are not drawn on the diagram, so they are found from a state table: for each state it shows the allowed events and the forbidden ones, and every forbidden "state + event" pair (an empty cell in the classic "state × event" grid) becomes a negative test.

State table: what is allowed in each state

StateAllowedForbidden
Newpay → Paid; cancel → Cancelledship, deliver
Paidship → Shipped; cancel → Cancelledpay, deliver
Shippeddeliver → Deliveredpay, ship, cancel
Delivered—pay, ship, deliver, cancel
Cancelled—pay, ship, deliver, cancel
Figure 2. Five valid transitions and fifteen forbidden "state + event" pairs: every forbidden pair is a negative test.

The valid transitions are covered by three tests: New → Paid → Shipped → Delivered, New → Cancelled and New → Paid → Cancelled. For each, check not only the new state but also the side effect: after cancelling a paid order a refund must start.

Of the fifteen forbidden pairs, the risky ones are chosen: Delivered + cancel, Cancelled + pay (paying a cancelled order), Paid + pay (a double click), New + ship (skipping payment), Shipped + cancel. The expected result is the same: an error with a proper code or message, while the state and the money stay unchanged. Payments work the same way: Declined → Captured is not allowed, and Refunded → Refunded must not return the money a second time.

A forbidden transition is checked not only through the interface. The "Cancel" button may be hidden in the Delivered state, but the server must reject such a request itself, because a request can be sent directly, replayed from a stale tab or race with another event.

Limits and alternatives

  • The model is useful while the states are few. If there are dozens, the diagram is split into sub-machines or risky paths are chosen.
  • When behaviour depends on history ("there was already one failed payment"), that is an extra state or a counter, not a new technique.
  • Simultaneous events (two tabs, a repeated request) are not shown on the diagram. They are checked separately as races.
  • For a result that depends on a combination of conditions within one state, a decision table is used alongside.

Typical mistakes

  • Checking only the happy path. It does not even reach valid transitions coverage: both cancellations stay untested, let alone the forbidden transitions.
  • Looking only at the interface. A hidden button does not prove the server forbids the transition.
  • Not checking side effects. The state changed, but the email, the refund or the analytics event did not happen.
  • Mixing a state and an attribute. "Paid" is a state, while "order amount" is not.

Check yourself

A model has 5 states and 4 events, with 5 valid transitions. How many forbidden "state + event" pairs are there?

Answer

5 × 4 = 20 pairs, of which 5 are valid, so 15 are forbidden. Each can be covered by a negative test, but in practice the risky ones are chosen.

Why check a forbidden transition at the API level if the interface has no button?

Answer

Because a request can be sent directly, replayed from an old tab or arrive in a race with another event. Protection only in the interface does not prove that the server keeps the state and the money consistent.

How does "all valid transitions" coverage differ from "all transitions"?

Answer

The first walks every arrow of the diagram. The second additionally tries every forbidden combination of state and event and checks that the system rejects it without side effects.

In an interview. Junior: For entities with states, such as a payment or an order, I draw a state diagram and check all valid transitions. And most importantly the invalid ones: a delivered order cannot be cancelled, and a refunded payment cannot be refunded again. Middle/Senior: I build a state table to see the forbidden pairs and pick the risky ones. I check forbidden transitions through the API, because the interface does not prove protection on the server, and I look at side effects: money, emails, events. Separately I test races of two events.

What is pairwise testing?

Pairwise testing requires every pair of values of any two parameters to appear in the set at least once, giving far fewer tests than full enumeration. It works because most defects come from one parameter or the interaction of two: three parameters with three values need nine tests instead of 27. The set is generated with constraints for impossible combinations, and risky triples are added by hand.

QA Fundamentals · Test design techniques

Three parameters with three values each give 27 combinations. Can you test fewer and lose nothing?

A settings form is opened in three browsers, under three account types and with three interface languages. Full enumeration is 27 runs, and with four parameters it is already 81. Add one more parameter, and the regression time no longer fits in a sprint. Pairwise testing shortens the set without losing the errors that occur most often.

How it works and why

An observation from practice: most defects are caused by a single parameter or the interaction of two. An error that shows up only when five values coincide is rare. Hence the idea: it is enough that every pair of values of any two parameters appears in the set at least once, and all full combinations are not needed.

Let us count on our example. There are three pairs of parameters (browser-account, browser-language, account-language), each with 3 × 3 = 9 value pairs, 27 pairs in total. One test with three values covers three pairs, so at least 27 / 3 = 9 tests are needed. That is three times fewer than full enumeration, and every pair such as "Chrome + Pro", "Safari + UK", "Free + EN" is guaranteed to appear.

Full enumeration and pairwise

All combinations: 27 tests

Checks everything, including what never breaks. For 4 parameters with 3 values it is already 81.

Pairwise: 9 tests

Every pair of values of two parameters appears at least once. For 4 parameters with 3 values only about 9-10 are needed.

Figure 1. The reduction grows with the number of parameters: full enumeration multiplies, pairwise hardly does.

Example: a set of nine tests

Here is a set in which every pair of values of two parameters appears at least once (for three parameters with three values this is an orthogonal array; a generator such as PICT builds a similar set heuristically, and it may be a few rows longer):

Nine tests cover all 27 pairs

TestBrowserAccountLanguage
1ChromeFreeUK
2ChromeProEN
3ChromeTeamPL
4FirefoxFreeEN
5FirefoxProPL
6FirefoxTeamUK
7SafariFreePL
8SafariProUK
9SafariTeamEN
Figure 2. Check: "Free + EN" is in test 4, "Team + UK" in test 6, "Safari + PL" in test 7. The same holds for every other pair.

In practice the set is generated, not composed by hand. One of the tools, Microsoft's PICT, takes a model of parameters and constraints:

Browser: Chrome, Firefox, Safari
OS: Windows, macOS, Linux
Account: Free, Pro, Team

IF [Browser] = "Safari" THEN [OS] <> "Linux";

The constraint removes impossible pairs: Safari does not run on Linux, so such combinations do not get into the set. Running pict model.txt prints a table of tests, which you then complete with the expected result.

Limits and alternatives

  • Pairwise does not guarantee finding defects that need three or more values at once. For critical spots, add manual combinations or take stronger coverage (three-way sets).
  • The values of the parameters are chosen first by other techniques: classes and boundaries give the representatives, pairwise only combines them.
  • The set does not know the expected result. It is defined for each row separately, and it is often the same (the form works).
  • Risky combinations (the most popular browser with a paid plan) are added on top of the set, even if the pairs are already covered.
  • Pairwise is not one of the core CTFL v4.0 techniques, it is a common combinatorial testing practice.

Typical mistakes

  • Not adding constraints. Impossible combinations get into the set, and tests fail for no reason.
  • Feeding all values to the generator without selection. A parameter with 30 values inflates the set. Classes first.
  • Treating the set as full protection. Pairwise lowers the risk but does not guarantee the absence of three-factor errors.
  • Forgetting the expected result. Without it the set checks nothing.

Check yourself

Four parameters with three values each. How many combinations in full enumeration and what is the theoretical minimum of pairwise tests?

Answer

Full enumeration is 34 = 81. Pairwise needs at least 3 × 3 = 9 tests, because two parameters with three values need 9 different pairs, and each test holds exactly one pair of these two parameters. A generator usually gives 9-10.

A bug shows up only in Safari, on a Free account, in Ukrainian. Does a pairwise set guarantee it will be found?

Answer

No. Pairwise guarantees every pair, but not every triple. The triple "Safari + Free + UK" may not occur. If that combination is risky, it is added by hand.

Why constraints in the model?

Answer

They exclude impossible combinations (Safari on Linux). Without them the set contains tests that cannot be run, and the generator may cover the remaining pairs worse.

In an interview. Junior: Pairwise helps when there are too many parameters for full enumeration. Most bugs come from one parameter or the interaction of two, so I cover all pairs of values, for example with the PICT generator, and add the expected result to every row. Middle/Senior: I first choose the values of the parameters with classes and boundaries, then generate the set with constraints for impossible combinations. I add risky triples by hand, because pairwise does not guarantee them. I judge the result by value: how much time is saved and which pairs are covered.

What are error guessing and experience-based checklists?

Error guessing is a technique in which a tester uses experience to pick places where a system typically breaks, and a checklist records such guesses. Both are experience-based techniques in ISTQB CTFL v4.0, alongside exploratory testing. A checklist is extended from production defects and loses items that no longer find anything. They complement formal techniques and do not replace them.

QA Fundamentals · Test design techniques

The form has no boundary and no decision table. Where will the tester look for bugs?

Formal techniques need requirements from which classes, boundaries or rules are derived. What if the requirements are thin and the time for testing is short? An experienced tester knows where things usually break: empty fields, spaces, emoji, a double click. That is error guessing. A written list of typical errors attacked on purpose is what ISTQB calls a fault attack, a way to implement error guessing. When the checks become a checklist of conditions that is kept up to date and anyone can test from, it is checklist-based testing. Both are experience-based techniques in ISTQB CTFL v4.0, alongside exploratory testing.

How it works and why

Errors are not distributed randomly: the same classes of defects repeat from project to project (unhandled empty input, a boundary error, a race). A tester who has seen them before builds a list of places where they may be and checks them on purpose. The benefit is speed, and that it finds what formal techniques do not anticipate.

A checklist turns individual experience into team knowledge: what one person knows "in their head" becomes an item that anyone can check. A living checklist is extended by found defects, especially those that reached production, and items that have not found anything for a long time are removed.

How a checklist grows with defects

1 Defect found 2 Add an item 3 Run every time 4 Prune the old
Figure 1. A checklist is alive while it is extended and pruned. An outdated list becomes a ritual.

Example: guesses for a "Name" field

The weak approach: enter "Ivan" and move on. The experienced approach asks where this field can break and picks a value for each:

ValueWhat it checks
(empty)Required field, the message
" Ivan "Spaces at the start and end: trimmed or stored
Ivan-Maria, O'BrienA hyphen and an apostrophe in validation and in database queries
Ivan😀Emoji and characters outside the basic plane, encoding
256 or more charactersLength limit, truncation in the database, broken layout
<b>Ivan</b>HTML escaping in the display
Double click on "Save"A duplicate record or request

The same goes for flows, not only fields: the Back button after submitting a form, refreshing the page in the middle of a payment, losing the network, two tabs with one account, reopening a link from an email, someone else's data in an open URL. Each such idea is a candidate for a checklist item.

Guesses and a checklist

Error guessing

Ideas arise during testing, depend on experience, may not be written down. Fast, flexible, but hard to repeat.

Checklist

The same ideas written down, extended by defects and available to the whole team. Repeatable, transferable, but may go stale.

Figure 2. A checklist is fixed error guessing. They complement each other.

Limits and alternatives

  • The quality depends on experience. A newcomer will not "guess" what they have not seen yet, so a checklist and colleagues' advice compensate for that.
  • Coverage by this technique cannot be measured like the coverage of classes or table columns. So it complements formal techniques rather than replacing them.
  • It differs from exploratory testing by its frame: error guessing is a set of guesses about defects, while exploratory is a session of learning and testing at once, in which such guesses can be used.
  • For security, access rights and financial accounts, guesses alone are not enough: separate models and technical checks are needed.

Typical mistakes

  • Doing error guessing instead of formal techniques. There is no systematic approach and the obvious can be missed.
  • Not writing down the guesses. The experience stays in one person's head and is not repeated.
  • Inflating the checklist. Nobody goes through three hundred items. Short and current beats full and dead.
  • Copying the same checklist onto every feature. Items must match the risks of the specific function.

Check yourself

After a production incident it turned out that a field does not handle a trailing space in an email. What do you do with the checklist?

Answer

Add an item "spaces at the start and end" for all text fields with identifiers. That turns one defect into a permanent check, and the same class of errors is much less likely to reach production again.

How does error guessing differ from a checklist?

Answer

Error guessing is an approach where the tester picks places where a defect may be, by experience. A checklist is the written, shared result of that experience, which can be repeated and extended. A checklist is the fixed form of guesses.

Why does error guessing not replace equivalence classes and boundaries?

Answer

Because it gives no systematic coverage: you do not know which classes and boundaries have been checked. Experience finds the unusual, formal techniques guarantee that the obvious is not missed.

In an interview. Junior: Error guessing is when I know from experience the typical places where things break: empty fields, special characters, a double click, refreshing the page in the middle of a process, a network drop. I use it together with formal techniques, not instead of them. Middle/Senior: I write guesses into a checklist, extend it with production defects and remove items that have not found anything for a long time. I tailor the checklist to the risks of the function instead of copying it everywhere. Formal techniques give systematic coverage, and experience covers what they do not anticipate.

Equivalence classes and boundary values: age 18–65

For an age field of 18 to 65 a sufficient set combines classes and boundaries: 17, 18, 19, 64, 65, 66 and one value from the middle, such as 30. The boundary values 17 and 66 already lie in the invalid classes, so separate representatives 10 and 80 are redundant. Empty, zero, negative, fractional and non-numeric input are also checked, and boundary inclusion is clarified with the analyst.

QA Fundamentals · Test design techniques

The "age" field accepts 18–65. What is the smallest set of values that covers both classes and boundaries?

The age field in a questionnaire must accept from 18 to 65. It is the classic example that shows how two techniques work together: equivalence classes give the structure, and boundary values catch errors at the edges. Below we work out which values to take, why part of the "representatives" become redundant and what else to check besides numbers.

How it works and why

Classes first. For the field "age 18–65" there is a valid class 18–65 and two invalid ones: less than 18 and more than 65. Representatives: 30, 10 and 80. One test per class, because the system handles all values of a class by one rule.

Classes for age 18–65

invalidvalidinvalid < 18 18 … 65 > 65 103080 Unusual: empty, 18.5, abc, -1
Figure 1. Three numeric classes and unusual inputs, which also have behaviour of their own.

Then boundaries. Errors in conditions like age > 18 instead of >= 18 live where the two variants diverge, that is, at the boundary itself. The site convention applies here: 2-value BVA gives four values (17, 18, 65, 66), 3-value BVA gives six, three at each boundary (17, 18, 19, 64, 65, 66).

Six values near the boundaries 18 and 65

lower boundaryupper boundary 17No 18Yes 19Yes 64Yes 65Yes 66No
Figure 2. This is 3-value BVA for age 18–65. 17 and 66 must be rejected, the rest accepted.

Example: the final set of tests

Now we combine. Notice that 17 already lies in the class "less than 18" and 66 in the class "more than 65". So the separate representatives 10 and 80 become redundant: the boundary values already cover those classes. Of the classes only the middle of the range remains, and the set shrinks to seven values:

AgeRoleExpected
17below the lower boundaryrejected
18lower boundaryaccepted
19above the lower boundaryaccepted
30middle of the rangeaccepted
64below the upper boundaryaccepted
65upper boundaryaccepted
66above the upper boundaryrejected

In addition I check inputs that the system may handle differently, each with its own test:

InputWhat it checks
(empty)The field is required
0 and -5Zero and a negative: the same error as for 17, or a separate check
18.5A fraction: reject or round
abcNon-numeric input
" 30 "Spaces around the value
99999999999A very long number, overflow

A weak set and a strong one

Typical

30, 40, 50, 60

All values from the middle of the range. The error age > 18 stays unnoticed.

Better

17, 18, 19, 30, 64, 65, 66

The middle plus three values at each boundary. Six tests check the boundaries, one the class.

Figure 3. Only three values more than in the typical set, but it catches far more.

Limits and alternatives

  • Whether the boundaries are inclusive must be clarified with the analyst: "from 18 to 65" may mean 18 ≤ age ≤ 65 or 18 ≤ age < 65. This is the most common ambiguity in requirements, and it is better closed before the tests.
  • In real forms age is almost never typed as a number. It is computed from a date of birth, and the boundary becomes a date: a person who "turns 18 tomorrow" is still 17. Then boundary values are taken in dates, not years, taking the time zone into account.
  • For a field with several boundaries (for example, tariffs by age 0–17, 18–65, 66+), each boundary is taken separately, and adjacent ranges do not repeat shared values.

Typical mistakes

  • Adding "middle" values instead of boundary ones. 30, 40, 50 and 60 add nothing new.
  • Not checking values outside the range. It is 17 and 66 that show the rejection works.
  • Duplicating representatives of classes already covered by boundaries. These are extra tests with no new information.
  • Not trying unusual inputs. An empty field and a decimal number often fail first.

Check yourself

Why do the separate representatives 10 and 80 become redundant when 17 and 66 are already in the set?

Answer

Because 17 lies in the class "less than 18" and 66 in the class "more than 65", so the boundary values already cover those classes. An extra test with 10 or 80 checks the same handling branch and gives no new information.

How many values are there in 2-value and 3-value BVA for the range 18–65?

Answer

2-value has four values: 17, 18, 65, 66. 3-value has six values: 17, 18, 19, 64, 65, 66.

Which clarification of the requirements is almost always needed for the field "from 18 to 65"?

Answer

Whether the boundaries are inclusive, that is, whether exactly 18 and exactly 65 are accepted. The expected result for two of the six boundary values depends on it.

In an interview. Junior: The classes for age 18–65 are the valid range and two invalid ones, below 18 and above 65. Boundaries: in 3-value that is 17, 18, 19, 64, 65, 66. Plus unusual inputs: empty, zero, negative, a fraction, letters. Middle/Senior: I combine classes with boundaries, because boundary values already cover the invalid classes, so only the middle of the range remains. I clarify the inclusiveness of the boundaries with the analyst. If age is computed from a date of birth, I check the boundaries in dates and with a time zone, not in years.

Decision table and state transition

A decision table fits when the current combination of conditions decides the result, while state transition fits when state and event history decide it. A discount by status and amount is a decision table, and cancelling an order by state is a state diagram. A table grows as 2 to the power of n, so it is collapsed only where independence is confirmed, and thresholds get boundary checks.

QA Fundamentals · Test design techniques

A discount depends on two conditions, an order status on the history of events. Which technique for which?

The two techniques in this chapter are often confused, because both draw tables and both are useful for business logic. But they answer different questions. A decision table answers what must happen for this combination of conditions now. State transition answers what must happen when an event arrives at an object that already has a history. This lesson is about telling them apart, counting the size of a table and where they work together.

How it works and why

A decision table fits when the result is determined by the current values of several conditions, and the order in which they became so does not matter. A discount is like that: VIP and an amount above 1,000 give the result regardless of what was before. State transition fits when the same event gives a different result depending on the state, and the state depends on earlier events. "Cancel" acts differently for a new order and for a delivered one.

Which technique to take

Decision table

Question: what is the result for this combination of conditions? Examples: discounts, tariffs, access rights, decline conditions. Unit of checking: a column (rule).

State transition

Question: what is allowed in this state? Examples: an order, a payment, an account, a ticket. Unit of checking: a transition (state + event).

Figure 1. If the result depends on history, you need states. If only on current conditions, a table.

Example: a discount and the size of the table

A discount depends on two conditions: whether the customer is VIP and whether the order amount is above 1,000 UAH. There are two conditions, so the full table has four rules, and each is checked separately:

A decision table for a discount

Condition / rule1234
Customer is VIPYesYesNoNo
Amount above 1,000YesNoYesNo
Discount15%10%5%0%
Figure 2. Four combinations, four different results. This is where you see that no rule is lost.

The table immediately raises a question that was not in the requirements: what about an amount of exactly 1,000? That is already the boundary of a condition, so it is checked with boundary value analysis: 1,000 and 1,000.01 (or 999.99, 1,000, 1,000.01 for 3-value). This is how the techniques combine: the table gives combinations, boundaries refine the threshold conditions.

The size of the table grows as 2n: two conditions give 4 rules, three 8, four 16, five 32, ten 1,024. So the table is collapsed by merging rules where a condition does not affect the result, and for large sets of conditions it is combined with pairwise or rules are chosen by risk.

State transition for an order

An order goes New → Paid → Shipped → Delivered and can move to Cancelled. For it we test all valid transitions and check that invalid ones are forbidden: a delivered order cannot be cancelled, nor a cancelled one paid.

When do both techniques work together? Often the state itself becomes a condition in a table. A refund depends on the order state and on the payment method: in Paid we refund fully, in Shipped minus delivery, in Delivered only through the return procedure. Here the state is one condition, the payment method another, and the result comes from the table.

Limits and alternatives

  • A table knows nothing about order. If a rule depends on a sequence ("the third failed attempt locks the account"), that is states with a counter.
  • A state diagram does not show combinations of conditions inside one transition. If permission depends on several conditions, a table is built alongside.
  • Both techniques need unambiguous requirements. The gaps they reveal are part of the benefit.

Typical mistakes

  • Taking a decision table for a history of events. A table does not reflect how the object got here.
  • Taking state transition for a combination of conditions. The diagram sprawls for nothing when four columns would do.
  • Not checking the boundaries of conditions. "Above 1,000" without checking 1,000 leaves the most common error.
  • Not counting 2n in advance. A table of six conditions with 64 columns will not be read by anyone.

Check yourself

Suppose the requirements change: a VIP gets 10% for any amount. How does that show in the table?

Answer

For a VIP the condition "amount above 1,000" has no effect, so the cell has "—", and the rules "VIP and a large amount", "VIP and a small amount" merge into one. For each pair of rules this should be confirmed by the requirements.

Which example needs a state diagram instead of a table: a tariff by number of users or locking an account after three failed logins?

Answer

Locking. The result depends on history (a counter of failed attempts), not on a current combination of conditions. The tariff is determined by current values, and a table is enough for it.

How do you link a decision table and BVA in the discount example?

Answer

The table gives combinations of VIP / not VIP and the amount above / below the threshold. The threshold "above 1,000" is a boundary, so 1,000 and 1,000.01 (and 999.99 for 3-value) are added to check that exactly 1,000 is handled according to the requirements.

In an interview. Junior: I use a decision table when the result depends on a combination of conditions, for example a discount by status and amount. State transition when an object has states, like an order: I check valid and invalid transitions. Middle/Senior: I take a table for combinations of conditions and a state diagram for the history of events, and when a transition depends on several conditions I combine them. I check the thresholds of conditions with boundaries, count the size of the table in advance and collapse it only where independence is confirmed by the requirements.

Use case testing

Use case testing derives tests from a description of how an actor reaches a goal: the main scenario, alternative branches and exceptions. It is black-box, and minimal coverage means the main scenario plus every branch at least once. Each case also checks the postcondition, for example that exactly one order was created. The technique covers data variation poorly, so equivalence classes and boundaries are added.

QA Fundamentals · Test design techniques

The main scenario works, but the payment is declined. What should happen then, and who checked it?

A tester walked through checkout from the cart to confirmation: all fine. In production a user enters a card with a zero balance, the system "hangs", the cart empties and there is no order. The main path was checked, but the branches where something goes wrong were not. Use case testing is exactly about this: a scenario has not only a happy path but also alternatives and exceptions, and each of them needs a test.

How it works and why. A use case describes how an actor (a user or another system) reaches a goal through interaction with the system. It consists of a name and goal, an actor, a precondition (the state before it starts), a main scenario in steps (the actor acts, the system responds), alternative flows (another but valid path, often returning to the main one), exceptions (an error, a refusal) and a postcondition (the state after). The technique is black-box: tests are derived from behaviour, not from code. It is convenient because a use case is written the way a person goes through a flow, so it finds defects at the joints of steps that equivalence classes do not see: the state after a refusal, going back a step, lost data.

A use case example

UC-7 Place an order
Actor: customer (signed in)
Precondition: the cart has an item
Main scenario:
 1. The customer presses "Checkout".
 2. The system shows addresses and delivery.
 3. The customer picks an address and delivery.
 4. The system shows the summary.
 5. The customer pays by card.
 6. The system confirms the order.
Alternatives:
 3a. No address: the customer adds one,
     then step 3.
 5a. Payment declined: the system offers
     another card, then step 5.
Exception:
 5b. Item is gone: the system reports it,
     no order is created.
Postcondition (success): the order exists,
                         the item is reserved

Where the scenario branches

Steps 1-3: address and deliverybranch 3a: no address, add a new oneStep 5: pay by card5a: declined, 5b: out of stockStep 6: order confirmedpostcondition: the order exists
Figure 1. The main path goes through all the steps, while alternatives 3a, 5a and 5b branch off specific steps and need tests of their own.

Example: from a use case to test cases. The minimum coverage of a use case is the main scenario and each alternative or exception flow at least once. Here are four tests:

TestPathExpected
TC-1steps 1-6the order exists
TC-23a, then 3-6address saved, order exists
TC-35a, then 5-6another card passes, one order
TC-45ba message, no order

In each case you check not only the screen but also the postcondition: whether exactly one order was created (TC-3 proves it, because the declined attempt must not create one), whether the item is reserved, whether money was not charged twice. The defect "the cart empties after a refusal" is caught by TC-3 exactly when the final state is stated explicitly.

Limits and alternatives. A use case describes data variations poorly: what happens if the card is expired and the promo code is also invalid, the scenario will not show. For that, equivalence classes and boundary values are added to a step, and a decision table for complex combinations of conditions. If states and transitions matter in the system (an order "new, paid, shipped"), state transition testing works better. In Agile a user story with acceptance criteria often replaces a use case, and each criterion yields a test. The quality of the tests depends on the quality of the use case: with a vague description you first need to clarify the expectations. Coverage is counted by scenario branches, not by code, so 100% coverage of use case branches does not mean every data combination was checked.

Typical mistakes.

  • Checking only the main scenario: most real defects are in refusals and returns.
  • Not checking the postcondition: the screen showed "error" but a half-created record stayed in the database.
  • Mixing everything into one case ("go through the main path and all the branches"): when it fails you cannot see which branch broke.
  • Trying only valid data at each step: a use case does not replace test design for data.
  • Taking a use case as the truth without questions: it has gaps too, worth asking an analyst about.

Check yourself

A use case has two steps with branches: one branch at step 3 and two at step 5. How many tests does the minimum coverage need and why not more?

Answer

Four: the main scenario and one test for each of the three branches. Every path is passed at least once, and trying all combinations of branches is not required, because that is a different (combinatorial) coverage with a different cost.

Test TC-3 (payment declined, a second card passes) passed on the screen, but the database holds two orders. What is the defect and what was missed?

Answer

The declined attempt created an order. The postcondition check was missed: after branch 5a exactly one order must remain. In a use case the final state of each branch is checked explicitly.

In an interview. Junior: A use case describes in steps how a user reaches a goal, with a main path and branches for errors. I derive tests from it: the main scenario and one test for each alternative or exception. Middle/Senior: It is a black-box technique that catches defects at the joints of steps and in the state after a refusal, so I check the postcondition of every branch explicitly. The weakness of the technique is data: I add variations with equivalence classes, boundaries and a decision table, and when states matter, with state transitions. In Agile it flows into tests from the acceptance criteria of a user story.