~/qa-guides/domain-testing
>_ Domain Testing: ON/OFF Points and Multivariable Boundaries
Choose boundary points for interacting inputs with three worked models and ten test cases. Includes open and closed borders, coverage calculations, and a defect that a complete point set misses.
Short answer
Domain testing checks input partitions and their borders, including rules involving interacting variables. Complete input tuples have ON, OFF, IN, or OUT roles relative to a particular border.
For a rule that accepts two integer quantities when both are positive and their sum is at most 10, testing each field's minimum independently leaves the joint limit open. The pairs (4, 6) and (4, 7) specifically exercise the change from acceptance to rejection at that sum boundary.
This guide develops three fictional, stateless validation models: an integer batch limit, decimal allocations with a strict upper limit, and two separate accepted regions. Their contracts, test cases, and reported failures are teaching examples. Adapt the observations to the actual operation being tested.
Domain testing versus BVA, EP, and pairwise testing
Equivalence partitioning provides the grouping model: which inputs should receive the same handling. Boundary value analysis explains how to select values around ordered limits, including the precision needed to identify immediate neighbors.
The task here is to derive complete tuples around borders such as x + y = 10. For that rule, 6 is an accepted value of y when x is 4, but it is rejected when x is 5. A fixed independent maximum for y does not describe this accepted region.
Pairwise testing asks whether selected pairs of parameter values occur in the test configurations. That inventory differs from an inventory of geometric borders and point roles. A pairwise set does not automatically include a tuple immediately across a calculated threshold.
Use domain testing after a changed combined limit, an eligibility rule involving several quantities, or a defect where individually plausible values produced the wrong joint outcome. First establish the intended predicate; deriving more points cannot settle an ambiguous requirement.
ON, OFF, IN, and OUT points
Definitions and coverage follow the ISTQB Advanced Test Analyst syllabus v4.0, section 3.1.1. Closed borders use <=, >=, or =; open borders use <, >, or !=. Nearest means at the declared input precision.
| Point | Closed border | Open border |
|---|---|---|
| ON | On border; included | Nearest interior point |
| OFF | Nearest exterior point | On border; excluded |
| IN | Inside, not ON | Inside, not ON |
| OUT | Outside, not OFF | Outside, not OFF |
Point roles are relative to a border. Record that border with the coordinates.
Make precision part of the model
For integer inputs, a permitted neighboring coordinate can differ by 1. For inputs constrained to hundredths, it can differ by 0.01. Between arbitrary real numbers, there is no nearest distinct value; a practical test design needs a stated input grid or another explicit selection rule.
In the sum examples below, each ON/OFF pair holds x constant and changes y by one permitted step. This makes the transition easy to reproduce. It is a deliberate direction of movement, rather than a requirement to change y in every domain test.
Separate the mathematical border from the accepted inputs. With x + y < 10.00, a sum of exactly 10.00 is excluded. Under the convention used here, that excluded equality point is OFF. The worked decimal model makes the input precision explicit before assigning the roles.
How to design a domain test set
1. Define the operation and complete input domain
Record the variables, types, units, permitted precision, and observation. A rule over parsed integers does not cover omitted properties, arbitrary strings, or a form's text normalization.
All three worked models return validation decisions without saving records. When adapting them to a create or update operation, add the required persistence observations: whether a record was created, which values were saved, and what must remain unchanged after rejection.
2. Write the partition predicates and label each border
Translate the acceptance rule into expressions that another tester can evaluate. Preserve parentheses around AND and OR groups. Give each constraint a stable label so that a changed constant can be traced back to affected test data.
For more than two inputs, retain complete tuples even if only one coordinate changes in a particular probe. A three-variable sum still depends on all three values; omitting the third from a case leaves the location unspecified.
3. Select points that isolate the intended constraint
Check the other conditions before crediting a rejection to the target rule. If both a minimum and a joint maximum fail, the reported minimum error leaves the maximum behavior unresolved.
Record the required evaluation priority when several rules fail. If the specification does not define a particular error, do not invent one from the implementation's current response.
4. Derive expected results before execution
Calculate the tuple's membership from the requirement. Then name the required decision and any returned values. A coordinate with a role label is test data; it becomes an executable case when the action, observation, and independent expectation are specified.
Use exact arithmetic where the contract defines an exact grid. A display rounded to two places does not establish which value reached a service validator.
5. Maintain a coverage ledger alongside results
List the border-role obligations and map selected executions to them. Keep unique input counts separate from obligation counts, and distinguish planned points from completed attempts.
Review the ledger when a rule changes. Moving a border can change a tuple's role or expected outcome even when the test description still says "check the limit."
Worked example 1: an integer batch with a shared maximum
Define the D1 contract
The validation operation receives two signed integers, x and y, representing counts of two item categories. Integer parsing has already succeeded. Negative integers can reach this operation and must be rejected by the business rules.
The accepted partition is x >= 1 AND y >= 1 AND x + y <= 10.
Validation checks these rules in the stated order:
- X_MIN: If
x < 1, return Rejected with reason X_MIN. - Y_MIN: Otherwise, if
y < 1, return Rejected with reason Y_MIN. - TOTAL_MAX: Otherwise, if
x + y > 10, return Rejected with reason TOTAL_MAX. - Accepted: Otherwise, return Accepted with the unchanged x and y and their exact total.
There are no other business constraints in D1. Each invocation is independent, so a previous rejection does not alter the next attempt.
Construct points for all three borders
This table constructs one isolated representative for each role at each border. The common IN point is (3, 3).
| Border | ON | OFF | IN | OUT |
|---|---|---|---|---|
x >= 1 | (1, 3) | (0, 3) | (3, 3) | (-1, 3) |
y >= 1 | (3, 1) | (3, 0) | (3, 3) | (3, -1) |
x + y <= 10 | (4, 6) | (4, 7) | (3, 3) | (4, 8) |
For the x border, y remains 3 and the sum limit passes for every listed point. The OFF and OUT inputs therefore produce X_MIN. The y-border rejection points similarly isolate Y_MIN.
For the sum border, both quantities remain positive. ON has total 10 and is accepted; OFF has total 11 and returns TOTAL_MAX. OUT has total 12 and returns the same reason, while IN has total 6 and is accepted.
The OUT choices are farther into the rejected side than the corresponding OFF choices. Repeating (4, 7) would repeat the same OFF evidence; it would not provide the selected OUT representative (4, 8).
Calculate simplified and reliable domain coverage
For <, <=, >, and >=, simplified coverage requires ON and OFF per border; reliable coverage adds IN and OUT. These are the named criteria in the ISTQB syllabus, section 3.1.1.
D1 has three borders in the accepted partition:
- Simplified construction:
3 x 2 = 6border-role obligations. The ON and OFF columns above provide six distinct tuples. - Reliable construction:
3 x 4 = 12border-role obligations. All four columns provide ten distinct tuples because the three IN assignments share(3, 3).
This is an explicit construction, not a claim that ten is the smallest possible set. Other sharing may be possible after checking every role and the intended observations. Keep the mapping visible when deduplicating.
The declared coverage scope is the accepted partition's three borders. It excludes type parsing, every possible multi-error combination, and separate inventories for the rejected regions. A result of 12/12 has meaning only with that scope attached.
Test case 1: cross the closed sum border
- Setup: Use D1 with parsed integer inputs and its stated rejection priority.
- Action: Submit
(4, 6), then submit(4, 7)as a separate invocation. - Expected result: The first returns Accepted with total 10 and unchanged quantities. The second returns Rejected with TOTAL_MAX.
- Evidence: Retain both effective tuples and decisions. The change in y is one integer step, and both minimum rules pass in both attempts.
If the operator were incorrectly changed from <= to <, the first attempt would fail. If the upper constant were incorrectly changed to 11, the second would be accepted. The pair distinguishes those specific errors without requiring the tester to inspect source code.
Test case 2: replace a masked rejection with isolated probes
- Setup: Use D1 and its X_MIN, Y_MIN, TOTAL_MAX priority.
- Action: Submit
(0, 11). Then submit(0, 3)and(4, 7)independently. - Expected result:
(0, 11)returns X_MIN, even though its sum is 11.(0, 3)returns X_MIN with the other rules satisfied.(4, 7)returns TOTAL_MAX with both minimums satisfied. - Evidence: Associate the isolated attempts with their respective borders. Keep the first attempt as evidence about the specified error priority.
A rejection for (0, 11) alone cannot distinguish a correct total validator from one that is absent. The same observable X_MIN result would occur in either implementation.
Test case 3: approach a corner in two directions
- Setup: Use D1. The tuple
(1, 9)lies on both the x minimum and the sum border. - Action: Submit
(1, 9),(0, 9), and(1, 10)independently. - Expected result:
(1, 9)is Accepted with total 10.(0, 9)returns X_MIN while its sum is 9.(1, 10)returns TOTAL_MAX while both quantities remain positive. - Evidence: Record which coordinate changed and which constraint changed truth value in each neighboring attempt.
The corner can supply an ON location for two borders. The surrounding rejected points answer different questions. Replacing both with (0, 10) would change the observations: its sum is 10, so it only violates the x minimum.
Test case 4: expose a tilted border after complete point coverage
Suppose a faulty implementation keeps both minimum rules but replaces the joint constraint with 2 * x + y <= 14. For this demonstration, it still returns the ordinary total x + y on acceptance.
Every one of the ten distinct tuples in the reliable construction receives the same decision and returned values under the correct and faulty implementations. At the selected sum ON point (4, 6), both boundaries happen to meet: 4 + 6 = 10 and 2 * 4 + 6 = 14.
- Setup: Use the correct D1 requirement as the expectation. Treat the faulty predicate as a hypothetical implementation to investigate.
- Action: Add the ON tuple
(6, 4)at another location onx + y = 10. - Expected result: D1 accepts it with total 10. The faulty implementation instead rejects it because
2 * 6 + 4 = 16, which exceeds 14. - Evidence: Keep the original complete ledger and the additional failing tuple. The extra location adds detection power without adding a new kind of border-role obligation.
One location on a sloped border cannot establish its orientation. This constructed counterexample explains why a named coverage target can be complete while an implementation defect remains. Additional locations should follow the model's risks, such as asymmetry between variables or a changed coefficient.
Worked example 2: decimal allocations with an open limit
Define the D2 contract and precision
D2 validates two resource allocations. Each field arrives as a decimal string with exactly two fractional digits and is interpreted on a 0.01 grid. Tuples below display those parsed values; submit each field in that two-digit form.
The accepted partition is x >= 0.50 AND y >= 0.50 AND x + y < 10.00. An accepted result returns both allocations unchanged and their exact total formatted to two fractional digits.
Wrong format returns FORMAT before business validation. For correctly formatted values, rejection priority is X_MIN, then Y_MIN, then TOTAL_LIMIT. The first two reasons indicate a value below 0.50; TOTAL_LIMIT indicates a sum of 10.00 or more.
Locate points around the strict sum border
Hold x at 4.00. Both minimum rules pass for every tuple in this table.
| Role | Tuple | Exact sum | Expected decision |
|---|---|---|---|
| ON | (4.00, 5.99) | 9.99 | Accepted |
| OFF | (4.00, 6.00) | 10.00 | Rejected: TOTAL_LIMIT |
| IN | (4.00, 5.00) | 9.00 | Accepted |
| OUT | (4.00, 6.01) | 10.01 | Rejected: TOTAL_LIMIT |
The mathematical border is the line with sum 10.00. The nearest permitted accepted sum is 9.99. Changing the coordinate step to 0.001 would change the nearest accepted representative; it would be a different precision model.
These four points address the sum border only. They are not a complete reliable construction for all three D2 borders.
Test case 5: distinguish the accepted neighbor from equality
- Setup: Submit decimal strings with two fractional digits to D2; verify the effective parsed values are not changed before business validation.
- Action: Submit
(4.00, 5.99)and(4.00, 6.00)independently. - Expected result: The first is Accepted with unchanged allocations and total 9.99. The second is Rejected with TOTAL_LIMIT.
- Evidence: Retain the submitted representations and decisions. Label the first tuple ON and the second OFF for this open border.
If the implementation mistakenly uses <= 10.00, the equality attempt becomes accepted. An attempt at (4.00, 6.01) would still be rejected, so using only that farther point would miss the operator error.
Test case 6: keep an extra-precision input outside the point ledger
- Setup: Use D2's exact two-fractional-digit format rule.
- Action: Submit x as
4.00and y as5.995. - Expected result: Reject with FORMAT. Do not silently round y and continue with a business decision.
- Evidence: Classify the attempt as a format test. It does not supply an ON or OFF representative on the declared 0.01 business-input grid.
In a product that intentionally rounds extra precision, that would be a different contract. Record the conversion rule and test the converted tuple at the business boundary. The text visible in the control and the value evaluated by the validator may then require separate observations.
Test case 7: exercise a closed lower border in the same model
- Setup: Use correctly formatted D2 inputs and keep y at 2.00.
- Action: Submit
(0.50, 2.00)and(0.49, 2.00)independently. - Expected result: The first is Accepted with total 2.50. The second returns X_MIN; its sum remains below 10.00.
- Evidence: Associate these points with the closed
x >= 0.50border, where equality is ON and the immediately lower value is OFF.
The sum border and the lower border have different inclusion rules even though both use the same precision. Assign roles from the individual predicate rather than copying the labels from the preceding test.
Verify the arithmetic independently
For these exact hundredths, scaled integers make the expectation straightforward: 4.00 becomes 400, 5.99 becomes 599, and the strict total rule becomes 400 + 599 < 1000.
The equality probe gives 400 + 600 = 1000, which fails that strict rule. No floating-point tolerance is needed to decide these examples. Introducing a tolerance into the expectation could accept the very equality value that the requirement excludes.
Use an exact decimal calculation or an appropriate scaled representation for the independent answer. Also inspect whether the tested product rounds, truncates, or rejects values before this rule; a correct calculation over the wrong effective input answers a different question.
Worked example 3: separate accepted regions and the gap between them
Define the D3 classifier
D3 receives signed integer coordinates and returns one of three decisions:
- Standard:
1 <= x <= 4 AND 1 <= y <= 4. - Wide:
7 <= x <= 10 AND 1 <= y <= 4. - Rejected: Every other integer tuple.
The two accepted rectangles are disjoint. Their union is the complete accepted region, with a gap at x values 5 and 6 when y is within 1 through 4.
Classification is observable. Returning Wide for a Standard point is a failure even though both decisions permit the operation. If those decisions trigger several downstream actions, a decision table can specify the required action combinations separately.
Select probes around the regions
This table shows selected transitions. It does not claim coverage of every border of both rectangles.
| Probe | Tuple | Local role | Global decision |
|---|---|---|---|
| R1 | (4, 2) | ON at Standard's right border | Standard |
| R2 | (5, 2) | OFF at Standard's right border | Rejected |
| R3 | (6, 2) | OFF at Wide's left border | Rejected |
| R4 | (7, 2) | ON at Wide's left border | Wide |
| R5 | (10, 2) | ON at Wide's right border | Wide |
| R6 | (11, 2) | OFF at Wide's right border | Rejected |
| R7 | (8, 4) | ON at Wide's upper y border | Wide |
| R8 | (8, 5) | OFF at Wide's upper y border | Rejected |
For R4, the same tuple (7, 2) is OUT relative to Standard's right border: it is beyond Standard and farther away than its OFF neighbor (5, 2). It is nevertheless accepted by Wide.
Consequently, "outside Standard" is not a complete expected result for the overall classifier. Evaluate every applicable region before choosing the global decision.
Test case 8: preserve the gap between two valid regions
- Setup: Use D3 with y fixed at 2.
- Action: Submit x values 4, 5, 6, and 7 in independent invocations.
- Expected result: The decisions are Standard, Rejected, Rejected, and Wide respectively.
- Evidence: Retain all four coordinate-decision pairs, including both rejected values between the accepted regions.
A faulty simplification that treats x values 1 through 10 as one continuous accepted range would accept the gap points. The endpoint successes at 4 and 7 alone cannot reveal that missing gap.
Test case 9: observe the selected region after leaving another
- Setup: Use D3 and record that the output must identify the matching region.
- Action: Submit
(7, 2). - Expected result: Return Wide. Rejecting it because it is outside Standard, or returning Standard because it is generally accepted, violates the contract.
- Evidence: Compare the actual classification, not only a generic success flag.
The tuple's local OUT role for Standard and its ON role for Wide are compatible. Roles describe the selected partition and border; the complete classifier determines the business outcome.
Test case 10: retain the second region's upper y limit
- Setup: Use D3 with x fixed at 8, which is outside Standard and within Wide's x range.
- Action: Submit
(8, 4)and(8, 5)independently. - Expected result: The first returns Wide; the second returns Rejected.
- Evidence: Confirm that Wide's y condition is enforced after its x condition is satisfied.
This pair exposes a faulty OR grouping such as (Standard rules) OR (7 <= x <= 10), which accidentally omits Wide's y restriction. A correct test of Standard's upper y limit would not exercise that separate Wide rule.
Record coverage and a finding without merging them
A useful result record names the model, selected point set, executed observations, and remaining questions. The following filled example refers to the deliberately faulty implementation in test case 4; it is not a report about a real product.
- Requirement: D1, positive integer counts with combined total at most 10.
- Coverage scope: The accepted partition's three borders under reliable domain coverage.
- Initial selected set: The ten distinct tuples in the D1 table, mapped to twelve border-role obligations.
- Initial execution: Ten completed attempts; all ten match the specified decision and any required returned values.
- Declared coverage: Twelve of twelve border-role obligations exercised. This does not establish correct behavior at every location on each border.
- Additional risk probe:
(6, 4), another ON location on the sum border. - Expected: Accepted, unchanged quantities, total 10.
- Observed in the hypothetical faulty implementation: Rejected with TOTAL_MAX.
- Expanded execution result: Eleven completed attempts, ten matching expectations and one failing. The declared twelve-obligation inventory remains covered.
- Investigation: The substituted predicate
2 * x + y <= 14explains both the initial agreement and the additional rejection.
Preserve the effective inputs and raw decisions with the result. If a UI changes a quantity or a service uses another unit, establish the value actually evaluated before blaming the partition rule.
When an attempt is blocked, record the missing observation explicitly. A prepared tuple is not execution evidence. When an attempt fails its expected result, retain both its coverage contribution and its failure; removing failing attempts from the ledger would obscure what was exercised.
Practical domain testing checklist
- Identify the complete tuple, input types, units, and permitted precision.
- Write a predicate and expected outcome for each relevant partition.
- Label each border and its inclusion rule.
- Derive an ON/OFF pair at a specific location using permitted neighboring inputs.
- Verify other constraints while isolating each intended rejection.
- Add IN and OUT representatives when the selected criterion requires them.
- Map shared points to explicit border-role obligations before deduplicating executions.
- Check corners with separately chosen movement directions.
- Add another location when a changed coefficient, asymmetry, or curved rule creates a distinct risk.
- Observe the selected business classification as well as acceptance.
- Separate format errors, blocked attempts, coverage, and expectation failures in the report.
Update the ledger when the rule changes
Reclassify points against the new requirement rather than retaining their old labels. For a revised D1 limit of x + y <= 12, (4, 6) becomes IN at the sum border, while the former OUT point (4, 8) becomes ON. A new isolated OFF neighbor is (4, 9). These are roles under the revised model, not additions to the old twelve-obligation report.
If D2 intentionally changes to three fractional digits and a 0.001 grid, (4.000, 5.999) becomes the nearest accepted sum probe. The earlier 9.99 sum is still accepted but no longer supplies the nearest interior point at that location. Update the representation checks too: 5.995 would no longer fail solely for having three fractional digits.
If D3 moves Wide's left border from 7 to 6, (6, 2) changes from Rejected to Wide and becomes ON at the revised border. (5, 2) remains Rejected and becomes the new OFF neighbor there. Preserve the requirement version with each result so that an intentional rule change is distinguishable from a regression.
FAQ
For both named criteria used here, = requires one ON and two OFF points on opposite sides; != requires one OFF and two ON points on opposite sides.
For an integer rule x = y with y fixed at 4, (4, 4) is ON; (3, 4) and (5, 4) are the two OFF points and are rejected. For x != y, the decisions reverse: (4, 4) is OFF, while (3, 4) and (5, 4) are ON and accepted. Additional constraints must still be considered when selecting usable representatives.
Yes, but point construction must follow the actual expression and input precision. For positive integer coordinates satisfying x * x + y * y <= 25, (3, 4) lies on the closed border because 9 + 16 = 25. Holding x at 3 and changing y to 5 gives a nearest exterior neighbor in that direction, with result 34.
Different locations on the curve need separate calculations. Some coordinate choices may have no permitted input exactly on the mathematical border. Record that limitation instead of inventing an exact ON point or substituting an arbitrary tolerance. Choose justified additional locations and state which coverage obligations are actually attainable on the declared input grid.