Domain Testing: ON and OFF Points

5 minutes 5 Questions

In the ISTQB Advanced Level Test Analyst syllabus, domain testing is a data-based technique that extends equivalence partitioning and boundary value analysis. It applies to input domains defined by one or more variables, often with linear boundary conditions such as x + y <= 100. The technique focuses on finding defects in how boundaries are implemented. Typical defects include a shifted boundary, a tilted boundary, a wrong closure (for example, < coded instead of <=), and missing or extra boundaries. To find these defects, the tester selects specific test points relative to each boundary. An ON point is a value that lies exactly on the boundary. An OFF point is a value as close as possible to the ON point, using the smallest meaningful increment (epsilon) for the data type, but on the opposite side of the boundary. Which side the OFF point falls on depends on the boundary closure. For a closed boundary (<= or >=), the ON point belongs to the domain, so the OFF point lies just outside it. For example, with x <= 10 for integers, the ON point is 10 and the OFF point is 11. For an open boundary (< or >), the ON point does not belong to the domain, so the OFF point lies just inside it. With x < 10, the ON point is 10 and the OFF point is 9. In both cases, the ON and OFF points always produce different outcomes. This is what lets them detect closure errors and boundary shifts. IN points, which lie inside the domain away from the boundaries, and OUT points, which lie outside, may be added as typical values. A common strategy is the 1x1 approach: one ON point and one OFF point per boundary. For n-dimensional linear boundaries, Beizer's N x 1 strategy uses n ON points and one OFF point to detect tilted boundaries. Test Analysts should define epsilon carefully, consider shared boundaries between adjacent domains, and avoid redundant points so that tests stay efficient yet thorough.

Domain Testing: ON and OFF Points (ISTQB CTAL-TA Data-Based Test Techniques)

Overview
Domain testing is one of the data-based test techniques in the ISTQB Advanced Level Test Analyst (CTAL-TA) syllabus. It generalizes equivalence partitioning and boundary value analysis. It works for single variables and also for multidimensional input spaces, where several variables jointly define a valid region (a domain). The central idea is to pick precise test points relative to each boundary. These are the ON points and OFF points, supported by IN and OUT points. Exam questions in this area are very mechanical. If you master the rules below, they become easy marks.

1. Why Domain Testing Is Important
Defects cluster at boundaries. Developers often write < instead of <=, use a wrong constant, or combine variables incorrectly in a condition. Domain testing is valuable for four reasons:
- It finds boundary (domain) defects systematically. These include closure defects (wrong operator), shifted boundaries (wrong constant) and tilted boundaries (wrong coefficient in a multi-variable condition). It also covers missing or extra boundaries.
- It handles several variables at once. Classic BVA treats each variable separately. Domain testing can test conditions such as x + y <= 10 or income - expenses > 500.
- It is efficient. A small, well-defined set of points per boundary detects most boundary faults, which keeps the number of tests low.
- It is precise and measurable. Coverage can be defined as the proportion of required ON and OFF points actually tested.

2. What Domain Testing Is: Key Terms
- Domain: a region of the input space in which the system behaves the same way, such as a partition. It is bounded by one or more boundaries defined by conditions.
- Boundary: the border of a domain, defined by a condition such as x >= 18, x < 100 or x + y <= 10.
- Closed boundary: the points on the boundary belong to the domain. The operators are <=, >= or =.
- Open boundary: the points on the boundary do NOT belong to the domain. The operators are < or >.
- ON point: a value that lies exactly on the boundary. It is defined by the boundary equation, NOT by whether it is valid.
- OFF point: a value as close as possible to the ON point but not on the boundary, lying on the other side of the boundary. 'As close as possible' depends on the precision of the data, for example 1 for integers or 0.01 for money.
- IN point: a value inside the domain that is not on any boundary, typically used for the other variables.
- OUT point: a value outside the domain that is not on any boundary.

3. How It Works: The Core Rules
Rule A: The ON point is always on the boundary.
Take the boundary expression and replace the operator with '='. Any value satisfying that equation is an ON point.

Rule B: Closure decides on which side the ON and OFF points fall.
- Closed boundary (<=, >=): the ON point is inside the domain (valid). The OFF point is outside the domain (invalid).
- Open boundary (<, >): the ON point is outside the domain (invalid). The OFF point is inside the domain (valid).
Memory aid: the OFF point always has the opposite domain membership to the ON point.

Rule C: Distance equals precision.
The OFF point is one smallest step (epsilon) away from the ON point. For integers this is 1. For values with two decimals it is 0.01. Always check the stated precision in the question.

Rule D: Equality boundaries.
For a condition like x = 0, the ON point is 0. There are two OFF points, one on each side: -1 and 1 for integers. This is because the domain can be exited in both directions.

Rule E: Simplified strategy.
For each boundary, test one ON point and one OFF point. For multidimensional linear boundaries, a stronger variant uses several ON points (often one per dimension) plus one OFF point. This variant also detects tilted boundaries. Variables not involved in the boundary under test should take IN (typical valid) values. That way a failure can be attributed to the boundary being tested.

4. Worked Examples
Example 1: closed boundary, integers. Requirement: age >= 18 is accepted.
- ON = 18, which is in the domain (accepted).
- OFF = 17, which is outside (rejected).

Example 2: open boundary, integers. Requirement: quantity < 100 is accepted.
- ON = 100. This is the boundary value, and it is outside the domain (rejected).
- OFF = 99, which is inside (accepted).
This is the classic exam trap: the ON point here is an invalid value.

Example 3: decimals. Requirement: amount <= 50.00, precision 0.01.
- ON = 50.00, which is valid.
- OFF = 50.01, which is invalid.

Example 4: two-dimensional boundary. Requirement: integers x and y, with discount granted when x + y <= 10.
- ON points satisfy x + y = 10, for example (4,6) or (7,3). They are valid, because the boundary is closed.
- OFF point: the closest point not on the boundary, on the invalid side, for example (4,7), where x + y = 11.
- If the condition were x + y < 10, the same ON points (sum = 10) would be invalid. The OFF point would then be sum = 9, for example (4,5), which is valid.

Example 5: equality. Requirement: code = 5 triggers the special route.
- ON = 5.
- OFF = 4 and 6.

Example 6: range with two boundaries. Requirement: 10 <= x < 20, integers.
- Lower boundary (closed): ON = 10 (valid), OFF = 9 (invalid).
- Upper boundary (open): ON = 20 (invalid), OFF = 19 (valid).
- Total: 4 test values.

5. Which Defects ON and OFF Points Detect
- Closure defect (for example >= coded as >): the ON point gives the wrong result.
- Shifted boundary (for example 18 coded as 19 or 17): either the ON point or the OFF point gives the wrong result.
- Tilted boundary (wrong coefficient, as in x + 2y instead of x + y): needs several ON points along the boundary.
- Missing boundary: the OFF point is processed as if it were inside the domain.
- Extra boundary: IN points detect it, because they unexpectedly fail.

6. Relationship to Other Techniques
Domain testing extends equivalence partitioning, since domains are partitions. It also extends boundary value analysis. For one-dimensional integer domains, ON and OFF points resemble 2-value BVA. The difference is that domain testing defines points relative to the boundary condition, not relative to the 'last valid value'. That is why open boundaries produce an invalid ON point. Unlike BVA, domain testing also applies naturally to conditions with several variables.

Exam Tips: Answering Questions on Domain Testing: ON and OFF Points
Tip 1: Find the operator first. Underline <, <=, >, >= or =. This tells you whether the boundary is open or closed, and the whole answer depends on it.
Tip 2: The ON point is the boundary value, whether or not it is valid. Distractors often offer '99' as the ON point for x < 100. That is wrong: the ON point is 100.
Tip 3: The OFF point lies on the opposite side from the ON point. If the ON point is valid, the OFF point is invalid, and vice versa.
Tip 4: Check the precision. Look for wording such as 'integer', 'two decimal places' or 'whole euros'. An OFF point of 50.1 is wrong if the precision is 0.01.
Tip 5: For equality conditions, expect two OFF points.
Tip 6: Count test cases carefully. With the simplified strategy, count 1 ON + 1 OFF per boundary. A range with two boundaries gives 4 values. Check whether the question allows shared or combined points, and whether IN points must be added.
Tip 7: In multidimensional questions, substitute the values into the expression. Verify that the ON candidates make the expression exactly equal to the constant. Verify that the OFF candidate misses it by one precision step on the correct side.
Tip 8: Keep the other variables at IN values. When a scenario has several conditions, the correct test for one boundary keeps all other variables at typical valid values.
Tip 9: Link points to defect types. If asked which point reveals a >= versus > mistake, the answer is the ON point. A shifted constant is revealed by the ON or the OFF point.
Tip 10: Eliminate options systematically. First remove answers whose 'ON point' is not on the boundary. Then remove answers whose OFF point is on the wrong side or at the wrong distance. Usually only one option remains.

Quick Summary
- ON = on the boundary.
- OFF = nearest point not on the boundary, with opposite membership.
- Closed boundary: ON is valid, OFF is invalid.
- Open boundary: ON is invalid, OFF is valid.
- Equality: one ON point and two OFF points.
- Distance is the data precision.
- Other variables take IN values.
Test mode:

CTAL-TA - Domain Testing: ON and OFF Points Example Questions

Test your knowledge of Domain Testing: ON and OFF Points

Question 1

A test analyst applies reliable domain coverage to the accepted partition of a battery-charge limit setting in a mobile app. The value is entered in whole percent. The partition is defined as: limit >= 10 AND limit <= 40 AND limit != 25, where 25 is reserved for a calibration mode. The analyst wants the smallest suite that meets the criterion. Points may serve more than one border wherever a role remains valid. How many test cases does the analyst need?

Question 2

A test analyst reviews drafted coverage items for a loyalty rule in a billing service. The rule grants a bonus when order total > 50.00 AND order total <= 200.00 AND membership level = 3. Order total uses a precision of 0.01 and membership level uses whole numbers. While one border is tested, the other variables keep valid values. The target is simplified domain coverage. The draft lists these points. Lower total border: ON 50.01 and OFF 50.00. Upper total border: ON 199.99 and OFF 200.00. Level border: ON 3, with OFF 2 and OFF 4. Which correction makes the draft satisfy simplified domain coverage?

Question 3

A test analyst applies reliable domain coverage to the boost partition of a water heater controller. The partition is defined as 10 <= T AND T < 50 AND M = 3. T is the tank temperature in whole degrees and M is the operating mode code, a whole number. Each atomic condition is a separate border. Each coverage item is counted once for the border it belongs to, even where one test input could serve several borders. How many coverage items does reliable domain coverage define for this partition?

More Domain Testing: ON and OFF Points questions
26 questions (total)