Black Box · Advanced

Domain Analysis

Domain analysis extends Equivalence Partitioning and Boundary Value Analysis to examine the relationships between variables. When a single variable’s partition isn’t enough because two inputs interact to define a boundary, domain analysis is the technique you need.

Senior Test Lead ISTQB CTAL-TA 3.2

1 The Hook

A Christchurch lender shipped a loan calculator. The amount field accepted $1,000 to $500,000 and was tested at both edges. The term field accepted 1 to 30 years and was tested at both edges. Each field, on its own, behaved perfectly. The tester signed it off.

Buried in a footnote of the spec was one extra rule: “Loans under $10,000 are only available for terms of 1–5 years.” That rule does not live on the amount axis or the term axis. It lives in the relationship between them. A customer asked for a $9,500 loan over 7 years — an amount that was individually valid and a term that was individually valid — and the system approved it, against the lender's own credit policy. Every single-field test passed. The bug sat on the diagonal line where the two fields meet, and no test had ever put $9,500 and 7 years in the same request.

This is what domain analysis is for. Boundary value analysis walks the edge of one variable at a time. But some boundaries only exist between variables — a line in two-dimensional space, not a point on one axis — and you can only test them by choosing the two values together, on purpose.

2 The Rule

When a valid range for one input depends on the value of another, the boundary is a line in the combined input space — so test the points on that line (on-point), just across it (off-point), well inside it (in-point), and well outside it (out-point), choosing the variables together rather than one at a time.

3 The Analogy

Analogy

A fishing rule that depends on two measurements at once.

A snapper regulation on the Hauraki Gulf might say: you may keep the fish if it is at least 30 cm long, but undersized fish are allowed only if you have caught fewer than your daily bag. Checking length alone tells you nothing — a 29 cm fish is fine for one angler and an offence for another, depending on how many are already in the bin. The rule is a line drawn across two measurements together: size and count. A fisheries officer who only ever held the ruler against the fish, and never counted the catch, would miss exactly the cases the rule was written to catch.

Domain analysis is measuring both at once and standing right on the line where the combined rule flips from legal to illegal. The single-variable check — just the ruler — can never find that boundary.

What it is

Equivalence Partitioning and Boundary Value Analysis are single-variable techniques. They assume inputs can be partitioned and tested independently. But real systems rarely have truly independent inputs. A loan calculator might accept amounts from $1,000 to $500,000 — but the minimum loan amount changes based on the term selected. A shipping cost might depend on both weight and destination zone together, not each alone.

Domain analysis is the advanced technique for these situations. It treats the input space as a multi-dimensional domain where boundaries between valid and invalid regions are defined by the interaction of multiple variables, not by a single variable in isolation.

The technique gives precise names to points around a boundary (on-point, off-point, in-point, out-point) and requires that you test these specifically designed points for each relevant boundary — including boundaries that exist only because two or more variables combine.

When to reach for domain analysis: when the specification contains phrases like “if X and Y then…”, when a field’s valid range depends on another field’s value, or when an integration test fails at a combination that individual unit tests don’t cover. That gap is often a domain boundary between variables.

Key terminology

Domain analysis uses four precise terms for points around a linear boundary:

  • On-point — the value exactly on the boundary. If the boundary is “age ≥ 18”, the on-point is 18. This is always tested.
  • Off-point — the value closest to the boundary on the other side. For “age ≥ 18” with integer values, the off-point is 17. This is always tested.
  • In-point — any value well inside the valid partition (away from the boundary). For “age ≥ 18”, an in-point might be 30. Confirms the interior of the partition is handled correctly.
  • Out-point — any value well outside the valid partition. For “age ≥ 18”, an out-point might be 5. Confirms rejection of clearly invalid values.

Standard BVA tests on-point and off-point for single variables. Domain analysis extends this to the combined boundaries created by multi-variable constraints.

Beyond single variables: inter-variable dependencies

Consider a system where the valid range of variable B depends on the value of variable A. This creates a constraint boundary in two-dimensional space — a line (or curve) in the A×B plane, not a single point on each axis.

Testing A and B independently misses every point that sits on or near this combined boundary. You need test cases designed specifically for the interaction — values of A and B chosen together so that their combination lands on, just inside, and just outside the constraint boundary.

For linear constraints (the most common case), the boundary is a straight line in the input space. Domain analysis requires test points on each side of this line plus a point on the line itself.

Worked example: loan calculator

A loan calculator has two inputs:

  • Loan amount: $1,000 – $500,000
  • Term: 1 – 30 years

Additional constraint from the spec: “Loans under $10,000 are only available for terms of 1–5 years.” This creates a cross-variable boundary: when amount < $10,000, term must be ≤ 5. Standard EP/BVA on each variable individually would not surface this constraint.

Loan calculator — domain analysis test points
Test point type Loan amount Term (years) Expected result What it tests
On-point (amount lower)$1,0003AcceptedMinimum amount in valid range
Off-point (amount lower)$9993RejectedJust below minimum amount
On-point (amount upper)$500,00025AcceptedMaximum amount in valid range
Off-point (amount upper)$500,00125RejectedJust above maximum amount
On-point (term lower)$50,0001AcceptedMinimum term
Off-point (term upper)$50,00031RejectedJust above maximum term
Cross-boundary: on-point$9,9995AcceptedSmall loan at max allowed term
Cross-boundary: off-point$9,9996RejectedSmall loan one year over constraint
Cross-boundary: threshold$10,0006AcceptedAmount at threshold — constraint no longer applies
Cross-boundary: off threshold$9,9996RejectedOne dollar under threshold — constraint still applies
In-point$100,00015AcceptedNormal mid-range case
Out-point$5,00020RejectedSmall loan with long term — clearly invalid combo

The rows labelled Cross-boundary are the ones unique to domain analysis. They test the constraint that exists only because two variables interact. EP/BVA on each variable individually would produce loan amount tests and term tests, but no test would ever combine $9,999 with a term of 6 years unless the tester deliberately reasoned about the inter-variable constraint.

Linear boundary analysis

When the constraint between two variables is expressed as a linear inequality (e.g., amount < $10,000 AND term ≤ 5 years), the boundary in the two-dimensional input space is a pair of line segments. Testing that boundary rigorously means:

  1. Identify the corner points of the boundary region (the vertices of the polygon in A×B space that defines the constraint).
  2. For each straight-line segment of the boundary, test at least one on-point (on the segment) and one off-point (just outside the valid region on the perpendicular to the segment).
  3. Test each corner of the boundary region — these are the highest-risk points because they are at the intersection of two constraints simultaneously.

This systematic approach ensures you do not miss boundary behaviour caused by rounding, floating-point precision, or off-by-one errors in the constraint implementation.

Non-linear boundaries: if a constraint is expressed as a formula (e.g., monthly repayment must not exceed 40% of income), the boundary curve is non-linear. Domain analysis still applies, but you need to test at enough points along the curve to catch approximation errors in the implementation. Choose test points that put the computation result at, just below, and just above the threshold.

ISTQB mapping

ISTQB reference
Syllabus refTopicLevel
CTAL-TA 3.2Domain analysis as advanced extension of EP and BVA; on-point/off-point/in-point/out-point terminologyAdvanced / Senior
CTAL-TA 3.2 K4Analyse a specification to identify domain boundaries and design test cases covering on/off/in/out pointsAdvanced LO
CTFL 4.2.1–4.2.2Foundation prerequisite — EP and BVA must be understood before applying domain analysisFoundation (prereq)

Domain analysis is an Advanced-level technique. The ISTQB CTAL-TA syllabus expects candidates to apply it at K4 (analyse): given a specification with inter-variable constraints, identify the domain boundaries and design test cases that systematically cover the on/off/in/out points of those boundaries.

Common mistakes

  • Treating variables independently — running BVA on each input field separately and calling it done. If any constraint in the spec references two variables at once, you need domain analysis for that constraint.
  • Missing constraint boundaries — constraints are often buried in spec footnotes, data dictionaries, or business rule tables. Do a focused read for any “if X then Y” language that involves two different inputs.
  • Testing only the interior — developers are usually good at handling values deep inside the valid region. Bugs cluster at boundaries. Prioritise on-points and off-points over in-points and out-points.
  • Using exact floating-point values as boundaries — if a constraint is computed (e.g., a percentage), find out whether the implementation uses integer arithmetic, decimal arithmetic, or floating-point. The on-point and off-point need to be designed relative to the implementation’s precision, not the spec’s idealised value.
  • Skipping constraint analysis in agile — domain analysis applies equally to acceptance criteria as it does to formal spec documents. If a user story says “given X is < 10 and Y is > 5”, there is an inter-variable domain boundary. Test it.

Domain analysis is a direct extension of Equivalence Partitioning and Boundary Value Analysis. If you haven’t mastered those first, domain analysis will not make sense.

When multiple variables interact, the conditions between them are often expressible as a cause-effect relationship. Use Cause-Effect Graphing to model those relationships explicitly before designing the test points.

For systems with many interacting variables where full domain analysis would be prohibitively expensive, Pairwise Testing provides a combinatorial reduction strategy — pair domain analysis (applied to the highest-risk variable pairs) with pairwise coverage for the rest.

Practice this technique: Try Senior Practice 05 — Loading & async states.

4 Now You Try

Three graded exercises — spot, fix, then build. Write your answer, run it for AI feedback, then compare to the model answer.

🔍 Exercise 1 of 3 — Spot: find the cross-variable boundary

A Work and Income NZ benefit-estimate tool has two inputs: weekly income ($0–$2,000) and hours worked per week (0–60). A spec footnote says: “An applicant declaring income above $800 per week must also declare 30 or more hours worked.” Identify the cross-variable boundary this creates and explain why testing each field on its own would miss it.

Show model answer
Cross-variable constraint: when weekly income > $800, hours worked must be >= 30. The two fields are linked — the valid range of hours depends on the income value.

The boundary in income x hours space: it is a line (an L-shaped region edge), not a point. Specifically, the constraint only bites once income crosses $800; on the high-income side, the valid region is cut off below 30 hours.

Why single-variable EP/BVA misses it: testing income alone (e.g. $799, $800, $801) and hours alone (e.g. 29, 30, 31) never forces the two values to be chosen TOGETHER. A test of "income $1,000" might be paired with a perfectly valid 40 hours; a test of "29 hours" might be paired with a low income. No single-field test ever lands on the combination "income $1,000 with 20 hours", which is the case the rule was written to reject.
🔧 Exercise 2 of 3 — Fix: correct mislabelled domain points

A tester analysed an ACC levy field with the constraint “cover applies for ages 18 to 65 inclusive” and labelled the points below. Several labels and expected results are wrong. Correct them, using on-point, off-point, in-point, out-point.

Flawed labelling:
Age 18 — off-point — Rejected
Age 17 — on-point — Accepted
Age 40 — out-point — Accepted
Age 90 — in-point — Rejected

Rewrite with correct point type and result for each:

Show model answer
Correct labelling for the boundary "age 18 to 65 inclusive" (lower boundary = 18):
- Age 18 — on-point — Accepted (the value exactly on the boundary; inclusive, so it is valid)
- Age 17 — off-point — Rejected (the value closest to the boundary on the invalid side)
- Age 40 — in-point — Accepted (well inside the valid partition)
- Age 90 — out-point — Rejected (well outside the valid partition)

What was wrong with the original:
- 18 was called off-point/Rejected: it is the ON-point and, because the range is inclusive, it must be ACCEPTED.
- 17 was called on-point/Accepted: it is the OFF-point and must be REJECTED.
- 40 was called out-point/Accepted: the result was right but the label was wrong — 40 is an IN-point.
- 90 was called in-point/Rejected: the result was right but the label was wrong — 90 is an OUT-point.
The original effectively swapped on/off and in/out throughout.
🏗️ Exercise 3 of 3 — Build: design the cross-boundary test set

A KiwiSaver first-home withdrawal tool has two inputs: amount withdrawn and balance retained. Rule: “You must leave at least $1,000 in your account after withdrawal.” So amount ≤ (balance − $1,000). For a member with a $50,000 balance, design domain-analysis test points (on, off, in, out) that test the cross-variable withdrawal boundary, with expected results.

Show model answer
Balance $50,000, so the rule "leave at least $1,000" means maximum withdrawal = $49,000.

- On-point:  withdraw $49,000 — Accepted (leaves exactly $1,000; boundary is inclusive)
- Off-point: withdraw $49,001 — Rejected (would leave $999, one dollar under the floor)
- In-point:  withdraw $20,000 — Accepted (leaves $30,000; well inside the allowed region)
- Out-point: withdraw $50,000 — Rejected (leaves $0; clearly violates the retain-$1,000 rule)

The point that single-variable testing would miss is the on/off pair at $49,000 / $49,001. The withdrawal limit is not a fixed number — it is defined by the balance, so the boundary moves with the other variable. A senior would also test a second balance (e.g. $5,000, max withdrawal $4,000) to confirm the limit tracks the balance correctly, and would check the exact inclusive/exclusive wording of "at least $1,000".

Self-Check

Click each question to reveal the answer.

Q1: What does domain analysis add beyond boundary value analysis?

BVA tests the edges of one variable at a time, treating inputs as independent. Domain analysis tests boundaries that exist only because two or more variables interact — a line or curve in the combined input space — by choosing the variables together so the combination lands on, just inside, and just outside the constraint.

Q2: Define on-point, off-point, in-point, and out-point.

On-point: the value exactly on the boundary (always tested). Off-point: the closest value on the other side of the boundary (always tested). In-point: any value well inside the valid partition. Out-point: any value well outside the valid partition. On and off points carry the most risk because bugs cluster at the edge.

Q3: For an inclusive boundary “age ≥ 18” with integer values, what are the on-point and off-point, and what results do they expect?

On-point is 18 (Accepted — the boundary itself is valid because it is inclusive). Off-point is 17 (Rejected — the nearest value on the invalid side). Getting these swapped, or mishandling the inclusive/exclusive wording, is the most common labelling error.

Q4: Why are the corner points of a linear constraint region the highest-risk to test?

A corner sits at the intersection of two constraints at once, so it is where two boundaries, and any rounding or off-by-one errors in either, can combine. Domain analysis tests each corner of the boundary region plus an on-point and off-point on each segment.

Q5: How do you spot, in a specification or user story, that domain analysis is needed?

Look for language that ties two inputs together — “if X and Y then…”, “available only when…”, or a field whose valid range depends on another field. Constraints are often buried in footnotes, data dictionaries, or acceptance criteria. Any such cross-reference between two inputs is a domain boundary to test.

Try It — Classify domain test points

A NZ KiwiSaver contribution calculator has this constraint: employees under 18 can only contribute 3% (not 4% or 8%). Age range: 16–65. Contribution rate options: 3%, 4%, 8%.

For each test case below, classify the point type and the expected result.

AgeRatePoint typeExpected result
173%
174%
184%
308%
153%