Home
Existing User Login
Brochure
Sign up for Risk-Free Trial
About Testcover.com
Frequently Asked Questions
Tutorial with Examples
->Equivalence Partitioning
->UML State Machines
--->Shopping Cart Example
--->Thermostat Example
--->Test Models, 3 Regions
--->Design Procedure
--->tempSet Designs
--->tempControl Designs
--->fanControl Designs
----->Stand-alone Transition
----->Integrated Transition
----->Integrated Target State
->Definitions of Terms
Performance
WSDL Interface
Background
Partners
Registrations
Contact Information
|
The thermostat example illustrates pairwise testing using a
Unified Modeling Language (UML)
state machine diagram.
This test design is for the fanControl region,
which controls the operation of the fan circulating the air.
It illustrates the integrated target state model, in which states of other regions are included as test factors.
The transitions to each target state in this region are combined into one partition.
Requirements summary.
Control of the air circulation fan is set with a sliding switch having two positions: AUTO and ON.
In the AUTO position the fan is on whenever the furnace or air conditioner is on.
In the ON position, the fan circulates air continually.
Details of the fan control operation are defined
in the fanControl region of the UML state machine diagram.
Test model.
In the fanControl region
there are 3 leaf states: autoOffWait, autoOnWait, fanOn.
There are 8 state transitions which are grouped into 3 partitions according to their target states:
# all fanControl states to autoOffWait
# all fanControl states to autoOnWait
# all fanControl states to fanOn
|
There are 7 test factors with values as follows.
Test Factor | Number of Values | Test Factor Values |
1. roomTemp | 4 |
49 70 78 100 |
2. heatTemp | 4 |
50 69 79 99 |
3. coolTemp | 4 |
50 69 79 99 |
4. tempSet state | 3 |
idleWait heatKeyWait coolKeyWait |
5. tempControl state | 5 |
heatOffWait heatOnWait coolOffWait coolOnWait tempControlOff |
6. fanControl state | 3 |
autoOffWait autoOnWait fanOn |
7. event | 10 |
A_OFF_TIMEOUT[tempControl->is_in(heatOnWait)]
A_OFF_TIMEOUT[tempControl->is_in(coolOnWait)]
A_OFF_TIMEOUT[else]
A_ON_TIMEOUT[tempControl->is_in(heatOnWait)]
A_ON_TIMEOUT[tempControl->is_in(coolOnWait)]
A_ON_TIMEOUT[else]
AUTO[tempControl->is_in(heatOnWait)]
AUTO[tempControl->is_in(coolOnWait)]
AUTO[else] ON
|
The else trigger events represent events with tempControl in any state other than heatOnWait or coolOnWait.
The test design is constructed following steps 12-14 of the design
procedure.
The relationship between the blocks of the fanControl integrated transition design and
those of the integrated target state design is presented
in the fanControl mapping table.
All the fanControl partitions with transitions leading to a particular target state are combined into one partition.
The 8 previous partitions are combined into 3 partitions in this design.
The test case generator request is given below.
The partition prefix FC:a indicates the region, fanControl (FC),
and the target state, e.g. autoOffWait (a),
for each test case.
Thermostat Example - fanControl integrated target state design
roomTemp
heatTemp
coolTemp
tempSet state
tempControl state
fanControl state
event
#FC:a fanControl states to autoOffWait
+ autoOffWait to autoOffWait (off temps)
70 78
50 69
79 99
idleWait heatKeyWait coolKeyWait
heatOffWait coolOffWait tempControlOff
autoOffWait
A_OFF_TIMEOUT[else]
+ autoOnWait to autoOffWait (off temps, after heatOnWait)
70
69
79 99
idleWait heatKeyWait coolKeyWait
heatOffWait
autoOnWait
A_ON_TIMEOUT[else]
+ autoOnWait to autoOffWait (off temps, after coolOnWait)
78
50 69
79
idleWait heatKeyWait coolKeyWait
coolOffWait
autoOnWait
A_ON_TIMEOUT[else]
+ autoOnWait to autoOffWait (on temps)
70 78
79 99
50 69
idleWait heatKeyWait coolKeyWait
tempControlOff
autoOnWait
A_ON_TIMEOUT[else]
+ fanOn to autoOffWait (off temps)
70 78
50 69
79 99
idleWait heatKeyWait coolKeyWait
heatOffWait coolOffWait tempControlOff
fanOn
AUTO[else]
+ fanOn to autoOffWait (on temps)
70 78
79 99
50 69
idleWait heatKeyWait coolKeyWait
tempControlOff
fanOn
AUTO[else]
#FC:A fanControl states to autoOnWait
+ autoOffWait to autoOnWait (heat)
49 78
79 99
50 69
idleWait heatKeyWait coolKeyWait
heatOnWait
autoOffWait
A_OFF_TIMEOUT[tempControl->is_in(heatOnWait)]
+ autoOffWait to autoOnWait (cool)
70 100
79 99
50 69
idleWait heatKeyWait coolKeyWait
coolOnWait
autoOffWait
A_OFF_TIMEOUT[tempControl->is_in(coolOnWait)]
+ autoOnWait to autoOnWait (heat)
49 78
79 99
50 69
idleWait heatKeyWait coolKeyWait
heatOnWait
autoOnWait
A_ON_TIMEOUT[tempControl->is_in(heatOnWait)]
+ autoOnWait to autoOnWait (cool)
70 100
79 99
50 69
idleWait heatKeyWait coolKeyWait
coolOnWait
autoOnWait
A_ON_TIMEOUT[tempControl->is_in(coolOnWait)]
+ fanOn to autoOnWait (heat)
49 78
79 99
50 69
idleWait heatKeyWait coolKeyWait
heatOnWait
fanOn
AUTO[tempControl->is_in(heatOnWait)]
+ fanOn to autoOnWait (cool)
70 100
79 99
50 69
idleWait heatKeyWait coolKeyWait
coolOnWait
fanOn
AUTO[tempControl->is_in(coolOnWait)]
#FC:F fanControl states to fanOn
+ autoOffWait to fanOn (off temps)
70 78
50 69
79 99
idleWait heatKeyWait coolKeyWait
heatOffWait coolOffWait tempControlOff
autoOffWait
ON
+ autoOffWait to fanOn (on temps)
70 78
79 99
50 69
idleWait heatKeyWait coolKeyWait
tempControlOff
autoOffWait
ON
+ autoOnWait to fanOn (on temps)
70 78
79 99
50 69
idleWait heatKeyWait coolKeyWait
heatOnWait coolOnWait tempControlOff
autoOnWait
ON |
The fanControl region has 52 test cases in 3 partitions in the integrated target state design.
The results tables follow.
#1.
fanControl states to autoOffWait
Test Case ID |
roomTemp |
heatTemp |
coolTemp |
tempSet state |
tempControl state |
fanControl state |
event |
Combo Countdown |
| 2 Values | 4 Values | 4 Values | 3 Values | 3 Values | 3 Values | 3 Values | 206 |
FC:a1 | 70 | 69 | 79 | coolKeyWait | tempControlOff | autoOffWait | A_OFF_TIMEOUT[else] | 185 |
FC:a2 | 78 | 50 | 79 | idleWait | coolOffWait | autoOnWait | A_ON_TIMEOUT[else] | 164 |
FC:a3 | 78 | 99 | 69 | heatKeyWait | tempControlOff | fanOn | AUTO[else] | 143 |
FC:a4 | 70 | 69 | 99 | heatKeyWait | heatOffWait | autoOnWait | A_ON_TIMEOUT[else] | 124 |
FC:a5 | 70 | 50 | 99 | coolKeyWait | coolOffWait | fanOn | AUTO[else] | 107 |
FC:a6 | 78 | 79 | 50 | coolKeyWait | tempControlOff | autoOnWait | A_ON_TIMEOUT[else] | 91 |
FC:a7 | 78 | 50 | 99 | idleWait | tempControlOff | autoOffWait | A_OFF_TIMEOUT[else] | 78 |
FC:a8 | 78 | 50 | 79 | idleWait | heatOffWait | fanOn | AUTO[else] | 68 |
FC:a9 | 70 | 99 | 69 | coolKeyWait | tempControlOff | autoOnWait | A_ON_TIMEOUT[else] | 60 |
FC:a10 | 70 | 79 | 50 | heatKeyWait | tempControlOff | fanOn | AUTO[else] | 52 |
FC:a11 | 78 | 50 | 79 | heatKeyWait | coolOffWait | autoOffWait | A_OFF_TIMEOUT[else] | 45 |
FC:a12 | 70 | 69 | 99 | idleWait | coolOffWait | fanOn | AUTO[else] | 40 |
FC:a13 | 78 | 69 | 99 | coolKeyWait | heatOffWait | autoOffWait | A_OFF_TIMEOUT[else] | 36 |
FC:a14 | 70 | 79 | 69 | idleWait | tempControlOff | autoOnWait | A_ON_TIMEOUT[else] | 33 |
FC:a15 | 78 | 99 | 50 | idleWait | tempControlOff | autoOnWait | A_ON_TIMEOUT[else] | 30 |
The test cases in partition 1 test the transitions from all allowed fanControl states to the autoOffWait state.
The constraints among the current states are the same as those in the fanControl integrated transition design.
All allowed pairs of current states leading to the autoOffWait state are included.
Each event value is paired with each of the allowed current states.
Test cases FC:a2, FC:a4, FC:a6, FC:a9, FC:a14, and FC:a15
include transient pairs of tempControl else states with autoOnWait.
Test cases FC:a1, FC:a2, and FC:a3 are set up as illustrated below.
FC:a1 is set up by setting the temperature sensor simulator to 70, heatTemp to 69, and coolTemp to 79.
The mode switch is set to OFF, and the fan switch is set to AUTO.
After the tempSet, tempControl, and fanControl states are idleWait, tempControlOff, and autoOffWait,
the SET button is pressed twice to take the tempSet state to coolKeyWait
before the autoOffWait timeout occurs.
FC:a2 is set up by setting the temperature sensor simulator to 99, heatTemp to 50, and coolTemp to 79.
The mode switch is set to COOL, and the fan switch is set to AUTO.
After the tempSet, tempControl, and fanControl states are idleWait, coolOnWait, and autoOnWait,
the temperature sensor simulator is set to 78 to take the tempControl state to coolOffWait.
FC:a3 is set up by setting the temperature sensor simulator to 78, heatTemp to 99, and coolTemp to 69.
The mode switch is set to OFF, and the fan switch is set to ON.
After the tempSet, tempControl, and fanControl states are idleWait, tempControlOff, and fanOn,
the SET button is pressed to take the tempSet state to heatKeyWait.
The fan switch is moved from ON to AUTO before the heatKeyWait timeout occurs.
#2.
fanControl states to autoOnWait
Test Case ID |
roomTemp |
heatTemp |
coolTemp |
tempSet state |
tempControl state |
fanControl state |
event |
Combo Countdown |
| 4 Values | 2 Values | 2 Values | 3 Values | 2 Values | 3 Values | 6 Values | 201 |
FC:A1 | 49 | 99 | 69 | coolKeyWait | heatOnWait | autoOffWait | A_OFF_TIMEOUT[tempControl->is_in(heatOnWait)] | 180 |
FC:A2 | 70 | 79 | 50 | heatKeyWait | coolOnWait | autoOffWait | A_OFF_TIMEOUT[tempControl->is_in(coolOnWait)] | 159 |
FC:A3 | 78 | 99 | 50 | idleWait | heatOnWait | autoOnWait | A_ON_TIMEOUT[tempControl->is_in(heatOnWait)] | 139 |
FC:A4 | 100 | 99 | 69 | heatKeyWait | coolOnWait | fanOn | AUTO[tempControl->is_in(coolOnWait)] | 120 |
FC:A5 | 70 | 79 | 69 | idleWait | coolOnWait | autoOnWait | A_ON_TIMEOUT[tempControl->is_in(coolOnWait)] | 104 |
FC:A6 | 78 | 79 | 50 | coolKeyWait | heatOnWait | fanOn | AUTO[tempControl->is_in(heatOnWait)] | 88 |
FC:A7 | 49 | 79 | 50 | heatKeyWait | heatOnWait | autoOnWait | A_ON_TIMEOUT[tempControl->is_in(heatOnWait)] | 79 |
FC:A8 | 100 | 79 | 50 | coolKeyWait | coolOnWait | autoOnWait | A_ON_TIMEOUT[tempControl->is_in(coolOnWait)] | 70 |
FC:A9 | 100 | 99 | 50 | idleWait | coolOnWait | autoOffWait | A_OFF_TIMEOUT[tempControl->is_in(coolOnWait)] | 64 |
FC:A10 | 49 | 79 | 69 | idleWait | heatOnWait | fanOn | AUTO[tempControl->is_in(heatOnWait)] | 58 |
FC:A11 | 78 | 99 | 69 | heatKeyWait | heatOnWait | autoOffWait | A_OFF_TIMEOUT[tempControl->is_in(heatOnWait)] | 53 |
FC:A12 | 70 | 99 | 69 | coolKeyWait | coolOnWait | fanOn | AUTO[tempControl->is_in(coolOnWait)] | 48 |
FC:A13 | 49 | 79 | 69 | idleWait | heatOnWait | autoOffWait | A_OFF_TIMEOUT[tempControl->is_in(heatOnWait)] | 46 |
FC:A14 | 70 | 99 | 69 | coolKeyWait | coolOnWait | autoOffWait | A_OFF_TIMEOUT[tempControl->is_in(coolOnWait)] | 44 |
FC:A15 | 49 | 99 | 69 | coolKeyWait | heatOnWait | autoOnWait | A_ON_TIMEOUT[tempControl->is_in(heatOnWait)] | 42 |
FC:A16 | 100 | 99 | 69 | heatKeyWait | coolOnWait | autoOnWait | A_ON_TIMEOUT[tempControl->is_in(coolOnWait)] | 40 |
FC:A17 | 78 | 99 | 69 | heatKeyWait | heatOnWait | fanOn | AUTO[tempControl->is_in(heatOnWait)] | 38 |
FC:A18 | 70 | 79 | 69 | idleWait | coolOnWait | fanOn | AUTO[tempControl->is_in(coolOnWait)] | 36 |
FC:A19 | 49 | 79 | 50 | heatKeyWait | heatOnWait | autoOffWait | A_OFF_TIMEOUT[tempControl->is_in(heatOnWait)] | 35 |
FC:A20 | 70 | 79 | 50 | heatKeyWait | coolOnWait | fanOn | AUTO[tempControl->is_in(coolOnWait)] | 34 |
The test cases in partition 2 test the transitions from all allowed fanControl states to the autoOnWait state.
The constraints among the current states are the same as those in the fanControl integrated transition design.
All allowed pairs of current states leading to the autoOnWait state are included.
Each event value is paired with each of the allowed current states.
Test cases FC:A1, FC:A2, FC:A9, FC:A11, FC:A13, FC:A14, and FC:A19
include transient pairs of tempControl on states with autoOffWait.
Test case FC:A1 is set up as illustrated below.
FC:A1 is set up by setting the temperature sensor simulator to 49, heatTemp to 99, and coolTemp to 69.
The mode switch is set to OFF, and the fan switch is set to AUTO.
After the tempSet, tempControl, and fanControl states are idleWait, tempControlOff, and autoOffWait,
the SET button is pressed twice to take the tempSet state to coolKeyWait.
The mode switch is moved from OFF to HEAT before the coolKeyWait and autoOffWait timeouts occur.
#3.
fanControl states to fanOn
Test Case ID |
roomTemp |
heatTemp |
coolTemp |
tempSet state |
tempControl state |
fanControl state |
event |
Combo Countdown |
| 2 Values | 4 Values | 4 Values | 3 Values | 5 Values | 2 Values | 1 Value | 183 |
FC:F1 | 70 | 69 | 79 | coolKeyWait | tempControlOff | autoOffWait | ON | 162 |
FC:F2 | 78 | 79 | 50 | heatKeyWait | coolOnWait | autoOnWait | ON | 141 |
FC:F3 | 78 | 50 | 99 | idleWait | tempControlOff | autoOffWait | ON | 124 |
FC:F4 | 78 | 99 | 69 | coolKeyWait | heatOnWait | autoOnWait | ON | 107 |
FC:F5 | 70 | 69 | 99 | heatKeyWait | heatOffWait | autoOffWait | ON | 95 |
FC:F6 | 70 | 99 | 69 | idleWait | coolOnWait | autoOnWait | ON | 84 |
FC:F7 | 78 | 50 | 79 | heatKeyWait | coolOffWait | autoOffWait | ON | 74 |
FC:F8 | 78 | 99 | 69 | heatKeyWait | tempControlOff | autoOffWait | ON | 67 |
FC:F9 | 70 | 50 | 99 | coolKeyWait | coolOffWait | autoOffWait | ON | 61 |
FC:F10 | 70 | 79 | 50 | heatKeyWait | tempControlOff | autoOffWait | ON | 55 |
FC:F11 | 78 | 50 | 79 | idleWait | heatOffWait | autoOffWait | ON | 50 |
FC:F12 | 78 | 79 | 50 | idleWait | heatOnWait | autoOnWait | ON | 45 |
FC:F13 | 70 | 69 | 99 | idleWait | coolOffWait | autoOffWait | ON | 42 |
FC:F14 | 70 | 99 | 50 | coolKeyWait | tempControlOff | autoOnWait | ON | 39 |
FC:F15 | 70 | 79 | 69 | coolKeyWait | coolOnWait | autoOnWait | ON | 36 |
FC:F16 | 78 | 69 | 99 | coolKeyWait | heatOffWait | autoOffWait | ON | 34 |
FC:F17 | 70 | 99 | 69 | heatKeyWait | heatOnWait | autoOnWait | ON | 32 |
The test cases in partition 3 test the transitions from all allowed fanControl states to the fanOn state.
(There are no transitions from fanOn.)
The constraints among the current states are the same as those in the fanControl integrated transition design.
All allowed pairs of current states leading to the fanOn state are included.
Each event value is paired with each of the allowed current states.
Test case FC:F14 includes the transient pair of states tempControlOff with autoOnWait.
Test case FC:F14 is set up as illustrated below.
FC:F14 is set up by setting the temperature sensor simulator to 70, heatTemp to 99, and coolTemp to 50.
The mode switch is set to HEAT, and the fan switch is set to AUTO.
After the tempSet, tempControl, and fanControl states are idleWait, heatOnWait, and autoOnWait,
the SET button is pressed twice to take the tempSet state to coolKeyWait.
The mode switch is moved from HEAT to OFF, and the fan switch is moved from AUTO to ON
before the coolKeyWait and autoOnWait timeouts occur.
|