Table 2.6.1.2.2: Decision table example
Table 2.6.1.2.2 shows the decision table for a module that has
Boolean inputs that indicate whether the OPEN or CLOSE buttons of an
elevator door have been pressed. When open_pressed is true and
close_pressed is false, the action is OPEN. When close_pressed is true and
open_pressed is false, the action is CLOSE. Table 2.6.1.2.2 shows that the
outcomes for when open_pressed and close_pressed are both true and
both false are undefined. Additional test cases setting open_pressed and
close_pressed both true and then both false are likely to expose problems.
A useful technique for designing tests for real-time systems is the
state-transition table. These tables define what messages can be processed
in each state. For example, sending the message 'open doors' to an
elevator in the state 'moving' should be rejected. Just as with decision
tables, undefined outcomes shown by blank table entries make good
candidates for testing.