yandex

decision tables

Monday, 03 February 2014 13:25

Decision tables are used:

  • when the output data or program behavior depends on the combinations of input data values;
  • by checking the “business rules”.

Decision tables are usually divided into four parts.

  • Conditions – a list of possible conditions.
  • Variants of the conditions’ performance – a combination of performance and / or failure of the conditions of this list.

  • Actions – a list of possible actions.

  • The need for actions – an indication whether the appropriate action should be performed for each combination of the conditions.

The actions can be simple, but can refer to other decision tables.

By actions execution, a priority can be set (for example: if it is possible to implement several actions by a certain combination of conditions performing, we should specify the priority of these actions in the decision table).

The table’s structure:

  1. Conditions – incoming data.
  2. Actions – outgoing data.
  3. Terms of Service – test cases.

The steps of table constructing

  1. To identify / write all the conditions.
  2. To calculate the number of possible conditions combinations.
  3. To fill in the combinations.
  4. To remove excess combinations.
  5. To record actions.

Example:

Input: a, b, c.
Output: determine the type of the triangle (equilateral, isosceles, versatile, not a triangle).
The step 1 (to determine the conditions):
Condition 1: a, b, c form a triangle? {Y, N};
Condition 2: a = b? {Y, N};
Condition 3: a = c? {Y, N};
Condition 4: b = c? {Y, N}.

Step 2 (to calculate combinations):

If all conditions are simple ({Y, N}):
The quantity of combinations = 2 * quantity of the conditions;
If the conditions are difficult ({A, B, C, D}):
The number of combinations = VC1 * VC2 * VC3 * VCn
N = 24 = 16

Step 3: (fill in combination)

If you’d like we apply our experience and knowledge to make your software better, you might be interested in our software testing service.

IntexSoft logo

IntexSoft 2017. All rights reserved.

IntexSoft is in the Clutch Top 10 of Belarusian Web & Software Developers More