ISTQB CTFL Chapter 4: Test Analysis and Design (Test Techniques with Worked Examples)

Chapter 4 is the heart of the exam. It carries 11 of the 40 questions, and 5 of them are K3 questions where you must apply a technique to a scenario. This page explains every technique with worked examples you can follow step by step, then gives you practice questions in the exam style.

Advertisement

ISTQB CTFL › 4. Test Analysis and Design Syllabus v4.0.1 · updated 3 Nov 2026

Exam weight Questions K-levels Training time
27.5% 11 6 × K2, 5 × K3 390 minutes

Keywords to remember (K1): acceptance criteria, acceptance test-driven development, black-box test technique, boundary value analysis, branch coverage, checklist-based testing, collaboration-based test approach, coverage, coverage item, decision table testing, equivalence partitioning, error guessing, experience-based test technique, exploratory testing, state transition testing, statement coverage, test technique, white-box test technique.

4.1 Test techniques overview (K2)

Test techniques help testers decide what to test (test analysis) and how to test (test design). They produce a small but sufficient set of test cases in a systematic way, and help identify test conditions, coverage items and test data.

The syllabus groups techniques into three families:

Family Also called Based on Key point
Black-box Specification-based The specified behaviour, without looking at the internal structure Tests stay valid even if the implementation changes but the required behaviour does not
White-box Structure-based The internal structure and processing (code, architecture, flows) Tests can only be created after the design or implementation exists
Experience-based The tester’s knowledge and experience Effectiveness depends heavily on the tester’s skill; finds defects the other two can miss, so they complement each other

A fourth group, collaboration-based approaches (section 4.5), focuses on avoiding defects through collaboration and communication.

4.2 Black-box test techniques

4.2.1 Equivalence partitioning (K3)

Equivalence partitioning (EP) splits data into partitions whose members are expected to be processed the same way. If one value in a partition reveals a defect, any other value in it should too, so one test per partition is enough.

Rules from the syllabus:

  • Partitions can be found for inputs, outputs, configuration items, internal values, time values and interface parameters.
  • They can be continuous or discrete, ordered or unordered, finite or infinite.
  • Partitions must not overlap and must not be empty.
  • Valid partitions hold values that should be processed; invalid partitions hold values that should be rejected or ignored (teams may define these slightly differently).
  • Coverage items = partitions, including invalid ones.
  • EP coverage = partitions exercised ÷ partitions identified × 100%.

Worked example 1: a single input

A loyalty program gives 1 point per ₹100 for orders of ₹100 to ₹10,000 (whole rupees). Orders below ₹100 earn no points, and orders above ₹10,000 need manager approval.

Partition Values Valid? Example test value
P1 ≤ 99 Valid (no points) 50
P2 100 to 10,000 Valid (points) 2,500
P3 ≥ 10,001 Valid (approval) 15,000
P4 Not a number Invalid “abc”

Four test cases give 100% EP coverage. If only 50, 2,500 and 15,000 were tested, coverage would be 3 ÷ 4 = 75%.

Worked example 2: several inputs and Each Choice coverage

When a test item has several sets of partitions, the simplest criterion is Each Choice coverage: every partition of every set is exercised at least once, without caring about combinations.

Checkout: payment method {card, UPI, net banking} and delivery {standard, express}.

Test Payment Delivery
1 Card Standard
2 UPI Express
3 Net banking Standard (any)

Three tests cover all 3 + 2 = 5 partitions. The minimum for Each Choice is the size of the largest set, here 3.

4.2.2 Boundary value analysis (K3)

Boundary value analysis (BVA) tests the edges of ordered partitions, because developers often misplace or forget boundaries (for example writing < instead of ≤). The boundary values are the minimum and maximum of each partition, including invalid partitions.

Version Coverage items per boundary value Coverage formula
2-value BVA The boundary value and its closest neighbour in the adjacent partition Boundary values exercised ÷ boundary values identified
3-value BVA The boundary value and both of its neighbours Boundary values and neighbours exercised ÷ all identified

3-value BVA is more rigorous. For example, if x ≤ 10 is wrongly coded as x = 10, the 2-value tests 10 and 11 both behave correctly, but the 3-value test 9 exposes the defect.

Worked example: password length

A password must be 8 to 16 characters long.

Partitions: ≤ 7 (invalid), 8 to 16 (valid), ≥ 17 (invalid). Boundary values: 7, 8, 16, 17.

Values to test Count
2-value BVA 7, 8, 16, 17 4
3-value BVA 6, 7, 8, 9, 15, 16, 17, 18 8

How the 3-value set is built: for 7 → 6, 7, 8; for 8 → 7, 8, 9; for 16 → 15, 16, 17; for 17 → 16, 17, 18. Duplicates are removed, leaving 8 values.

Check your arithmetic twice

Most BVA mistakes in the exam come from (1) forgetting that the boundaries of the invalid partitions also count, and (2) not removing duplicate values. Write the partitions down before you count.

4.2.3 Decision table testing (K3)

Decision tables test requirements where combinations of conditions lead to different actions, such as business rules.

  • Conditions and actions are the rows; each column is a decision rule (one combination).
  • Limited-entry tables use only true/false; extended-entry tables allow ranges, partitions or multiple values.
  • Notation: T = true, F = false, – = irrelevant, N/A = infeasible; for actions X = happens, blank = does not happen.
  • A full table has a column for every combination: with n Boolean conditions, 2ⁿ columns.
  • Columns with infeasible combinations can be deleted, and columns where a condition does not matter can be merged (minimisation algorithms are out of scope).
  • Coverage items = feasible columns. Coverage = columns exercised ÷ feasible columns.

Strengths: systematic, finds missing combinations, and reveals gaps and contradictions in requirements. Weakness: the number of rules grows exponentially, so large tables may need minimisation or a risk-based selection.

Worked example: delivery and discount rules

Free delivery if the customer is a member OR the order is over ₹999. An extra 5% discount only if the customer is a member AND pays online.

R1 R2 R3 R4 R5 R6 R7 R8
C1 Member? T T T T F F F F
C2 Order > ₹999? T T F F T T F F
C3 Pays online? T F T F T F T F
A1 Free delivery X X X X X X
A2 5% discount X X

Three conditions → 2³ = 8 rules, all feasible, so 100% decision table coverage needs 8 test cases. If a test suite exercised only R1, R4 and R8, coverage would be 3 ÷ 8 = 37.5%.

Merging example: R7 and R8 have the same actions and differ only in C3, so they could be merged into one column “F, F, –”.

4.2.4 State transition testing (K3)

A state diagram models a system’s states and the valid transitions between them. A transition is triggered by an event, may have a guard condition, and may cause an action: written as event [guard] / action. A state table shows the same model as a grid (states × events); empty cells are invalid transitions, which the diagram does not show.

Three coverage criteria:

Criterion Coverage items Strength
All states coverage States Weakest; can often be achieved without exercising every transition
Valid transitions coverage (0-switch) Single valid transitions Most widely used; 100% guarantees 100% all states
All transitions coverage All valid and invalid transitions in the state table Strongest; 100% guarantees both others. Should be the minimum for mission- and safety-critical software

Test only one invalid transition per test case to avoid defect masking (one defect hiding another).

Worked example: article publishing workflow

States: Draft, In review, Approved, Published. Valid transitions:

From Event To
Draft submit In review
In review approve Approved
In review reject Draft
Approved publish Published

State table (blank = invalid):

State \ Event submit approve reject publish
Draft In review
In review Approved Draft
Approved Published
Published
  • All states: one test, submit → approve → publish, visits all 4 states.
  • Valid transitions: that test misses reject. One longer test, submit → reject → submit → approve → publish, covers all 4 valid transitions.
  • All transitions: 4 × 4 = 16 cells, of which 12 are invalid. Each invalid transition needs its own test case, so you need at least 12 test cases; the valid transitions can be covered inside them on the way to each invalid attempt.

4.3 White-box test techniques

4.3.1 Statement testing and statement coverage (K2)

Coverage items = executable statements. Statement coverage = statements exercised ÷ executable statements.

100% statement coverage means every statement ran at least once, so any statement with a defect was executed. But it does not guarantee finding every defect (for example a division by zero that only fails for one value), and it does not ensure all decision logic was tested.

4.3.2 Branch testing and branch coverage (K2)

A branch is a transfer of control between two nodes in the control flow graph: either unconditional (straight-line) or conditional (a decision outcome, such as true/false of an if, a case, or exiting or continuing a loop).

Coverage items = branches. Branch coverage = branches exercised ÷ total branches.

Branch coverage subsumes statement coverage: 100% branch coverage always gives 100% statement coverage, but not the other way round. Even 100% branch coverage may miss defects that need a specific path.

Worked example

1  read amount
2  if amount > 1000 then
3      discount = amount * 0.1
4  end if
5  print amount - discount
  • One test with amount = 1500 executes every statement → 100% statement coverage. But it only takes the true outcome of the decision; the false branch (skipping line 3) is never exercised, so branch coverage is below 100%.
  • Adding a test with amount = 500 takes the false branch → 100% branch coverage with 2 tests.
  • Notice the defect the second test reveals: when the false branch runs, discount was never initialised. Statement coverage alone missed it.

4.3.3 The value of white-box testing (K2)

Strength Weakness
Takes the whole implementation into account, so defects can be found even when the specification is vague, outdated or incomplete Cannot find defects of omission: if a requirement was never implemented, there is no code to cover
Gives an objective measure of code coverage, which black-box testing alone cannot
Can be used in static testing (dry runs, reviewing code not yet runnable, pseudocode, control flow graphs)

4.4 Experience-based test techniques

4.4.1 Error guessing (K2)

The tester anticipates errors, defects and failures using knowledge of how the application behaved before, the mistakes developers tend to make, and failures in similar applications. Typical problem areas: input (valid input rejected, missing parameters), output (wrong format or result), logic (missing cases, wrong operator), computation, interfaces (parameter mismatch) and data (wrong initialisation or type).

Fault attacks are a structured way to do error guessing: build a list of likely errors, defects and failures, then design tests to expose them.

Example list for a date field: 29 February in a non-leap year, 31 April, an empty value, a year with two digits, a date far in the future, a date in another format.

4.4.2 Exploratory testing (K2)

Tests are designed, executed and evaluated at the same time while the tester learns about the test object. Often organised as session-based testing:

  • A fixed time box (for example 60 minutes)
  • A test charter with the test objectives to guide the session
  • Test session sheets to note steps and discoveries
  • A debriefing with stakeholders afterwards

Most useful when specifications are poor or there is time pressure, and as a complement to formal techniques. It works best with experienced testers who have domain knowledge, analytical skill, curiosity and creativity, and it can use other techniques such as EP inside a session.

Example charter: “Explore the coupon feature with expired, stacked and case-varied codes to discover pricing errors.”

4.4.3 Checklist-based testing (K2)

The tester designs and runs tests to cover conditions from a checklist, built from experience, knowledge of what matters to users, or an understanding of why software fails.

Good checklists:

  • Phrase items as questions that can be checked separately and directly.
  • Do not include items that can be checked automatically, items better used as entry or exit criteria, or items that are too general.
  • Are updated regularly from defect analysis, because items wear out as developers learn to avoid those errors, while staying reasonably short.

They support functional and non-functional testing (for example usability heuristics). High-level checklists give some consistency without detailed test cases, with more variability: potentially greater coverage but less repeatability.

4.5 Collaboration-based test approaches

These approaches aim at defect avoidance through collaboration and communication, not only defect detection.

4.5.1 Collaborative user story writing (K2)

A user story describes a feature valuable to a user or purchaser. It has three critical aspects, the 3 C’s:

C Meaning
Card The medium: an index card or an entry on an electronic board
Conversation How the software will be used; spoken or documented
Confirmation The acceptance criteria

Common format: “As a [role], I want [goal], so that [business value]”, followed by the acceptance criteria. Business, development and testing write it together, using techniques such as brainstorming and mind mapping, to get a shared vision.

Good stories follow INVEST: Independent, Negotiable, Valuable, Estimable, Small, Testable. If a stakeholder cannot say how to test a story, it may be unclear, may not be valuable to them, or they may just need help with testing.

4.5.2 Acceptance criteria (K2)

Acceptance criteria are the conditions an implementation must meet to be accepted by stakeholders; they can be seen as the test conditions for the story. They usually come out of the Conversation.

They are used to: define the scope of the story, reach consensus among stakeholders, describe positive and negative scenarios, serve as the basis for acceptance testing, and allow accurate planning and estimation.

Format Example
Scenario-oriented (Given/When/Then, as in BDD) Given a cart worth ₹1,200, When the user applies coupon FLAT200, Then the total is ₹1,000
Rule-oriented (bullet verification list or input-output table) • Coupon works only on carts over ₹1,499 • Only one coupon per order • Codes are not case-sensitive

Teams may use other formats as long as the criteria are well-defined and unambiguous.

4.5.3 Acceptance test-driven development (ATDD) (K3)

ATDD is a test-first approach: test cases are written before the story is implemented, by people with different perspectives (customers, developers, testers).

  1. Specification workshop: analyse, discuss and write the user story and its acceptance criteria; resolve gaps and ambiguities.
  2. Create test cases from the acceptance criteria (as a team or by the tester). These are examples of how the software works. Techniques from 4.2 to 4.4 can be used.
  3. Order: positive tests first, then negative tests, then non-functional characteristics.
  4. Write tests in language stakeholders understand: preconditions, inputs and postconditions.
  5. Tests must cover all characteristics of the story, must not go beyond it, and no two tests should describe the same characteristic.
  6. In a format an automation framework supports, developers can automate them as they build the feature, making them executable requirements.

Worked example

Story: As a shopper, I want to save items for later, so that I can buy them another day. Acceptance criteria: (1) a “Save for later” button moves an item from the cart to a saved list; (2) saved items stay after logout and login; (3) a saved item that goes out of stock shows “Out of stock” and cannot be moved back to the cart.

Test Type Steps and expected result
T1 Positive Given an item in the cart, When the shopper clicks “Save for later”, Then the item leaves the cart and appears in the saved list
T2 Positive Given a saved item, When the shopper logs out and logs in again, Then the item is still in the saved list
T3 Negative Given a saved item that goes out of stock, When the shopper opens the saved list, Then it shows “Out of stock” and “Move to cart” is disabled

A test such as “the saved list loads in under 1 second” would be a non-functional test that comes after these, and only if it is part of the story’s acceptance criteria. A test for “share the saved list by email” would go beyond the story and should not be included.

Learning objectives checklist

LO Level You should be able to…
FL-4.1.1 K2 Distinguish black-box, white-box and experience-based techniques
FL-4.2.1 K3 Use equivalence partitioning to derive test cases
FL-4.2.2 K3 Use boundary value analysis to derive test cases
FL-4.2.3 K3 Use decision table testing to derive test cases
FL-4.2.4 K3 Use state transition testing to derive test cases
FL-4.3.1 K2 Explain statement testing
FL-4.3.2 K2 Explain branch testing
FL-4.3.3 K2 Explain the value of white-box testing
FL-4.4.1 K2 Explain error guessing
FL-4.4.2 K2 Explain exploratory testing
FL-4.4.3 K2 Explain checklist-based testing
FL-4.5.1 K2 Explain collaborative user story writing
FL-4.5.2 K2 Classify the options for writing acceptance criteria
FL-4.5.3 K3 Use ATDD to derive test cases

Chapter 4 self-check (14 questions)

Question 1 FL-4.1.1 (K2)

Which statement about black-box test techniques is correct?

  1. A. Test cases can only be created after the code is written
  2. B. Test cases remain useful if the implementation changes but the required behaviour stays the same
  3. C. They measure the percentage of code executed
  4. D. Their effectiveness depends mainly on the tester’s experience
Show answer

Answer: B. Test cases remain useful if the implementation changes but the required behaviour stays the same

Black-box tests are based on the specified behaviour, independent of how it is implemented. Creating tests after the code and measuring code coverage describe white-box techniques; dependence on experience describes experience-based techniques.

Question 2 FL-4.2.1 (K3)

A shipping fee rule uses parcel weight in whole kilograms: 1 to 5 kg costs ₹50, 6 to 20 kg costs ₹120, and over 20 kg is rejected. Weights of 0 or less are invalid. What is the minimum number of test cases for 100% equivalence partitioning coverage?

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

Answer: C. 4

The partitions are ≤0 (invalid), 1 to 5, 6 to 20, and ≥21 (rejected). One value from each of the 4 partitions is enough.

Question 3 FL-4.2.1 (K3)

A form has a “plan” field {Basic, Pro, Enterprise} and a “billing” field {Monthly, Yearly}. What is the minimum number of test cases for 100% Each Choice coverage?

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

Answer: B. 3

Each partition of each set must be exercised at least once. Three tests can cover the three plans while also covering both billing options, so the minimum is the size of the largest set, 3.

Question 4 FL-4.2.2 (K3)

An exam score is valid from 0 to 100 (whole numbers). Using 2-value boundary value analysis, which set gives 100% coverage?

  1. A. 0, 100
  2. B. 0, 1, 99, 100
  3. C. −1, 0, 100, 101
  4. D. −1, 0, 1, 99, 100, 101
Show answer

Answer: C. −1, 0, 100, 101

The partitions are ≤−1, 0 to 100, and ≥101. The boundary values are −1, 0, 100 and 101. 2-value BVA covers each boundary and its closest neighbour in the adjacent partition, which is exactly this set.

Question 5 FL-4.2.2 (K3)

A field accepts 1 to 50 items per order. Using 3-value boundary value analysis, how many distinct values must be tested?

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

Answer: C. 8

Boundary values are 0, 1, 50 and 51. With both neighbours of each: 0 → −1, 0, 1; 1 → 0, 1, 2; 50 → 49, 50, 51; 51 → 50, 51, 52. Without duplicates: −1, 0, 1, 2, 49, 50, 51, 52 = 8 values.

Question 6 FL-4.2.3 (K3)

A decision table has 4 independent Boolean conditions and no infeasible combinations. Tests exercise 6 of its rules. What is the decision table coverage?

  1. A. 25%
  2. B. 37.5%
  3. C. 50%
  4. D. 75%
Show answer

Answer: B. 37.5%

A full table with 4 Boolean conditions has 2⁴ = 16 rules. Coverage is 6 ÷ 16 = 37.5%.

Question 7 FL-4.2.3 (K3)

What is the main strength of decision table testing?

  1. A. It always produces fewer test cases than equivalence partitioning
  2. B. It systematically identifies combinations of conditions and can reveal gaps in requirements
  3. C. It measures branch coverage of the code
  4. D. It needs no knowledge of the requirements
Show answer

Answer: B. It systematically identifies combinations of conditions and can reveal gaps in requirements

Decision tables make every combination of conditions explicit, so overlooked combinations and contradictions or gaps in requirements become visible.

Question 8 FL-4.2.4 (K3)

A state table has 5 states and 4 events. Exactly 7 cells contain valid transitions. How many invalid transitions must be attempted to achieve 100% all transitions coverage?

  1. A. 7
  2. B. 13
  3. C. 20
  4. D. 27
Show answer

Answer: B. 13

The table has 5 × 4 = 20 cells. 20 − 7 valid = 13 invalid transitions, each of which must be attempted (ideally one per test case).

Question 9 FL-4.2.4 (K3)

Which statement about state transition coverage criteria is correct?

  1. A. 100% all states coverage guarantees 100% valid transitions coverage
  2. B. 100% valid transitions coverage guarantees 100% all states coverage
  3. C. All transitions coverage does not include invalid transitions
  4. D. Valid transitions coverage is the strongest criterion
Show answer

Answer: B. 100% valid transitions coverage guarantees 100% all states coverage

Exercising every valid transition necessarily visits every state. The reverse is not true. All transitions coverage includes invalid transitions and is the strongest criterion.

Question 10 FL-4.3.2 (K2)

Which statement about statement and branch coverage is correct?

  1. A. 100% statement coverage guarantees 100% branch coverage
  2. B. 100% branch coverage guarantees 100% statement coverage
  3. C. Branch coverage counts only unconditional transfers of control
  4. D. 100% branch coverage guarantees that all defects are found
Show answer

Answer: B. 100% branch coverage guarantees 100% statement coverage

Branch coverage subsumes statement coverage. Branches include both conditional and unconditional transfers, and even full branch coverage can miss defects that need a specific path.

Question 11 FL-4.3.3 (K2)

Which is a weakness of white-box testing?

  1. A. It cannot be used in static testing
  2. B. It cannot detect defects of omission, such as missing requirements
  3. C. It gives no measure of code coverage
  4. D. It cannot be applied when the specification is incomplete
Show answer

Answer: B. It cannot detect defects of omission, such as missing requirements

If a requirement was never implemented, there is no code to cover, so white-box testing cannot reveal it. It can be used statically, measures coverage objectively and works even with vague specifications.

Question 12 FL-4.4.1 (K2)

A tester has a list of failures seen in similar payment apps and designs tests to provoke them. Which technique is this?

  1. A. Exploratory testing
  2. B. Error guessing using fault attacks
  3. C. Checklist-based testing
  4. D. Decision table testing
Show answer

Answer: B. Error guessing using fault attacks

Building a list of likely errors, defects and failures and designing tests to expose them is a fault attack, a way to implement error guessing.

Question 13 FL-4.4.2 (K2)

Which element is typical of session-based exploratory testing?

  1. A. Detailed test cases written weeks in advance
  2. B. A test charter, a time box and a debriefing
  3. C. A full decision table for each feature
  4. D. Mandatory 100% statement coverage
Show answer

Answer: B. A test charter, a time box and a debriefing

Session-based testing structures exploratory testing with a time-boxed session guided by a test charter, followed by a debriefing with stakeholders.

Question 14 FL-4.5.3 (K3)

A story says “As a shopper, I want to apply one coupon per order.” Using ATDD, which test should be written FIRST?

  1. A. Apply two coupons and check the second is rejected
  2. B. Apply one valid coupon and check the total is reduced correctly
  3. C. Check the coupon screen loads in under 1 second
  4. D. Check that coupons can be shared on social media
Show answer

Answer: B. Apply one valid coupon and check the total is reduced correctly

ATDD starts with positive tests that confirm correct behaviour, then negative tests (A), then non-functional ones (C). Option D goes beyond the story.

Next: Chapter 5: Managing the Test Activities.

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.