Decision points

Approach Coverage based - Conditions
Test variety
  • Functionality
  • Security
Test basis Functional design
Coverage types
   

With almost every system, there are decision points, where the system behaviour can go in different directions, depending on the outcome of such a decision point.
 


Definition: A decision point is a combination of one or more conditions that define the conditions for the various possibilities in the subsequent system behaviour.

The various conditions collectively determine the outcome of the decision point. The way in which a condition contributes to the outcome is reflected in terms such as “AND” or “OR”. There is a special kind of mathematics – Boolean algebra, or proposition logic – for the manipulation of these types of constructions. This chapter employs the theory of Boolean algebra, but the intention is not to instruct on this, and the interested reader is referred to the countless books on this subject. Below are the most important basic principles of Boolean algebra that are necessary for the techniques for covering decision points. Take, for example, the following decision point that consists of only one condition: IF (number of books > 8) THEN extra discount

Decision points that consist of such singular conditions lead to two test situations, namely the situation in which the condition is true and the situation in which the condition is false. In Boolean algebra, 0 is used to indicate that something is false; 1 is used if something is true. In our example, this refers to the following test situations:

Test situation 1 2
Number of books > 8 ≤ 8
Results True (1) False (0)

Decision points can also consist of combinations of conditions, the so-called compound condition. Compare the following compound conditions:
IF ( Number of books > 8 OR sum ≥ €250 ) THEN extra discount
and
IF ( Number of books > 8 AND sum ≥ €250 ) THEN extra discount

Often an abbreviation is used by replacing the conditions by a capital letter (A, B, etc.) The two decision points mentioned above are thus abbreviated to:
A OR B and
A AND B
A compound condition is also either true or false, depending on the truth values of the individual conditions and the way in which the conditions are connected (the so-called operators): by an AND or an OR. With two conditions, the following combinations are possible:

A B
1 1
1 0
0 1
0 0

This is called the complete decision table.
In the 0-0 situation, both statements are false. In the 0-1 situation and the 1-0 situation, only one of the two statements is true and in the 1-1 situation, both are true. The end result in each of the 4 situations depends on the operator “AND” or “OR”: with an “AND” the end result of two conditions is only true if both individual conditions are true; in all the other cases, the end result is false. With an “OR” the reverse is the case: the end result is only false if both individual conditions are false; in all the other cases the end result is true.

See for an additional explanation the following presentation: