Home
Existing User Login
Brochure
Sign up for Risk-Free Trial
About Testcover.com
Frequently Asked Questions
Tutorial with Examples
->UML State Machine
--->Thermostat
--->Test Models
--->Design Procedure
--->tempSet Designs
----->Stand-alone Transition
----->Integrated Transition
----->Integrated Target State
----->Integrated Propagation
--->tempControl Designs
--->fanControl Designs
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 tempSet region,
which allows the user to set the heating and cooling temperatures.
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.
Normally the thermostat displays the current room temperature.
By pressing the SET button the user can select a state to display and set the temperature for heating or cooling.
In these temperature setting states, the user can raise or lower the temperature setting by pressing the UP or DOWN button.
Each UP/DOWN press changes the temperature setting by one degree, within operational limits.
The thermostat returns to its current temperature display state after a timeout period.
Details of the temperature setting operation are defined
in the tempSet region of the UML state machine diagram.
Test model.
In the tempSet region
there are 3 leaf states: idleWait, heatKeyWait, and coolKeyWait.
There are 7 state transitions which are grouped into 3 partitions according to their target states:
# all tempSet states to idleWait
# all tempSet states to heatKeyWait
# all tempSet states to coolKeyWait
|
The tempSet integrated target state design
uses the same blocks and test factor values
as in the previous, integrated transition design.
The difference is that the integrated target state design contains fewer partitions and yields fewer test cases.
Each pair of states from all regions is associated with each of this region's target states.
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 51 98 99 |
| 3. coolTemp | 4 |
50 51 98 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 | 12 |
IDLE_TIMEOUT H_KEY_TIMEOUT C_KEY_TIMEOUT
SET UP[heatTemp<maxTemp] UP[heatTemp>=maxTemp]
DOWN[heatTemp>minTemp] DOWN[heatTemp<=minTemp]
UP[coolTemp<maxTemp] UP[coolTemp>=maxTemp]
DOWN[coolTemp>minTemp] DOWN[coolTemp<=minTemp]
|
The test design is constructed following steps 12-14 of the design
procedure.
The relationship between the blocks of the tempSet integrated transition design and
those of the integrated target state design is presented
in the tempSet mapping table.
All the tempSet partitions with transitions leading to a particular target state are combined into one partition.
The 7 previous partitions are combined into 3 partitions in this design.
The test case generator request is given below.
The partition prefix TS:I indicates the region, tempSet (TS),
and the target state, e.g. idleWait (I),
for each test case.
Thermostat Example - tempSet integrated target state design
roomTemp
heatTemp
coolTemp
tempSet state
tempControl state
fanControl state
event
#TS:I tempSet states to idleWait
+ idleWait to idleWait (heatOffWait coolOffWait tempControlOff) x (autoOffWait fanOn)
70 78
50 51
98 99
idleWait
heatOffWait coolOffWait tempControlOff
autoOffWait fanOn
IDLE_TIMEOUT
+ idleWait to idleWait (heatOnWait coolOnWait) x (autoOnWait fanOn)
70 78
98 99
50 51
idleWait
heatOnWait coolOnWait
autoOnWait fanOn
IDLE_TIMEOUT
+ heatKeyWait to idleWait (heatOffWait coolOffWait tempControlOff) x (autoOffWait fanOn)
70 78
50 51
98 99
heatKeyWait
heatOffWait coolOffWait tempControlOff
autoOffWait fanOn
H_KEY_TIMEOUT
+ heatKeyWait to idleWait (heatOnWait coolOnWait) x (autoOnWait fanOn)
70 78
98 99
50 51
heatKeyWait
heatOnWait coolOnWait
autoOnWait fanOn
H_KEY_TIMEOUT
+ coolKeyWait to idleWait (heatOffWait coolOffWait tempControlOff) x (autoOffWait fanOn)
70 78
50 51
98 99
coolKeyWait
heatOffWait coolOffWait tempControlOff
autoOffWait fanOn
C_KEY_TIMEOUT SET
+ coolKeyWait to idleWait (heatOnWait coolOnWait) x (autoOnWait fanOn)
70 78
98 99
50 51
coolKeyWait
heatOnWait coolOnWait
autoOnWait fanOn
C_KEY_TIMEOUT SET
#TS:H tempSet states to heatKeyWait
+ idleWait to heatKeyWait (heatOffWait coolOffWait tempControlOff) x (autoOffWait fanOn)
70 78
50 51
98 99
idleWait
heatOffWait coolOffWait tempControlOff
autoOffWait fanOn
SET
+ idleWait to heatKeyWait (heatOnWait coolOnWait) x (autoOnWait fanOn)
70 78
98 99
50 51
idleWait
heatOnWait coolOnWait
autoOnWait fanOn
SET
+ heatKeyWait to heatKeyWait (heatOffWait coolOffWait tempControlOff) x (autoOffWait fanOn)
70 78
51
98
heatKeyWait
heatOffWait coolOffWait tempControlOff
autoOffWait fanOn
UP[heatTemp<maxTemp] DOWN[heatTemp>minTemp]
+ heatKeyWait to heatKeyWait (heatOnWait coolOnWait) x (autoOnWait fanOn)
70 78
98
51
heatKeyWait
heatOnWait coolOnWait
autoOnWait fanOn
UP[heatTemp<maxTemp] DOWN[heatTemp>minTemp]
+ internal transition down (heatOffWait coolOffWait tempControlOff) x (autoOffWait fanOn)
70 78
50
99
heatKeyWait
heatOffWait coolOffWait tempControlOff
autoOffWait fanOn
DOWN[heatTemp<=minTemp]
+ internal transition down heatOnWait x (autoOnWait fanOn)
49
50
50
heatKeyWait
heatOnWait
autoOnWait fanOn
DOWN[heatTemp<=minTemp]
+ internal transition down coolOnWait x (autoOnWait fanOn)
70 78
50
50
heatKeyWait
coolOnWait
autoOnWait fanOn
DOWN[heatTemp<=minTemp]
+ internal transition up heatOffWait x (autoOffWait fanOn)
100
99
99
heatKeyWait
heatOffWait
autoOffWait fanOn
UP[heatTemp>=maxTemp]
+ internal transition up (coolOffWait tempControlOff) x (autoOffWait fanOn)
70 78
99
99
heatKeyWait
coolOffWait tempControlOff
autoOffWait fanOn
UP[heatTemp>=maxTemp]
+ internal transition up (heatOnWait coolOnWait) x (autoOnWait fanOn)
70 78
99
50
heatKeyWait
heatOnWait coolOnWait
autoOnWait fanOn
UP[heatTemp>=maxTemp]
#TS:C tempSet states to coolKeyWait
+ heatKeyWait to coolKeyWait (heatOffWait coolOffWait tempControlOff) x (autoOffWait fanOn)
70 78
50 51
98 99
heatKeyWait
heatOffWait coolOffWait tempControlOff
autoOffWait fanOn
SET
+ heatKeyWait to coolKeyWait (heatOnWait coolOnWait) x (autoOnWait fanOn)
70 78
98 99
50 51
heatKeyWait
heatOnWait coolOnWait
autoOnWait fanOn
SET
+ coolKeyWait to coolKeyWait (heatOffWait coolOffWait tempControlOff) x (autoOffWait fanOn)
70 78
51
98
coolKeyWait
heatOffWait coolOffWait tempControlOff
autoOffWait fanOn
UP[coolTemp<maxTemp] DOWN[coolTemp>minTemp]
+ coolKeyWait to coolKeyWait (heatOnWait coolOnWait) x (autoOnWait fanOn)
70 78
98
51
coolKeyWait
heatOnWait coolOnWait
autoOnWait fanOn
UP[coolTemp<maxTemp] DOWN[coolTemp>minTemp]
+ internal transition down (heatOffWait tempControlOff) x (autoOffWait fanOn)
70 78
50
50
coolKeyWait
heatOffWait tempControlOff
autoOffWait fanOn
DOWN[coolTemp<=minTemp]
+ internal transition down coolOffWait x (autoOffWait fanOn)
49
50
50
coolKeyWait
coolOffWait
autoOffWait fanOn
DOWN[coolTemp<=minTemp]
+ internal transition down (heatOnWait coolOnWait) x (autoOnWait fanOn)
70 78
99
50
coolKeyWait
heatOnWait coolOnWait
autoOnWait fanOn
DOWN[coolTemp<=minTemp]
+ internal transition up (heatOffWait coolOffWait tempControlOff) x (autoOffWait fanOn)
70 78
50
99
coolKeyWait
heatOffWait coolOffWait tempControlOff
autoOffWait fanOn
UP[coolTemp>=maxTemp]
+ internal transition up heatOnWait x (autoOnWait fanOn)
70 78
99
99
coolKeyWait
heatOnWait
autoOnWait fanOn
UP[coolTemp>=maxTemp]
+ internal transition up coolOnWait x (autoOnWait fanOn)
100
99
99
coolKeyWait
coolOnWait
autoOnWait fanOn
UP[coolTemp>=maxTemp] |
The tempSet region has 76 test cases in 3 partitions in the integrated target state design.
The results tables follow.
#1.
tempSet states to idleWait
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 | 3 Values | 4 Values | 265 |
| TS:I1 | 70 | 51 | 99 | idleWait | tempControlOff | fanOn | IDLE_TIMEOUT | 244 |
| TS:I2 | 78 | 50 | 98 | heatKeyWait | tempControlOff | autoOffWait | H_KEY_TIMEOUT | 223 |
| TS:I3 | 70 | 98 | 50 | coolKeyWait | heatOnWait | autoOnWait | C_KEY_TIMEOUT | 202 |
| TS:I4 | 78 | 99 | 51 | coolKeyWait | coolOnWait | fanOn | SET | 181 |
| TS:I5 | 70 | 51 | 98 | coolKeyWait | coolOffWait | autoOffWait | SET | 164 |
| TS:I6 | 78 | 99 | 51 | idleWait | heatOnWait | autoOnWait | IDLE_TIMEOUT | 148 |
| TS:I7 | 70 | 99 | 50 | heatKeyWait | coolOnWait | autoOnWait | H_KEY_TIMEOUT | 133 |
| TS:I8 | 70 | 50 | 99 | idleWait | heatOffWait | autoOffWait | IDLE_TIMEOUT | 120 |
| TS:I9 | 78 | 51 | 98 | heatKeyWait | heatOffWait | fanOn | H_KEY_TIMEOUT | 108 |
| TS:I10 | 78 | 98 | 50 | idleWait | coolOnWait | fanOn | IDLE_TIMEOUT | 97 |
| TS:I11 | 78 | 50 | 98 | coolKeyWait | coolOffWait | fanOn | C_KEY_TIMEOUT | 87 |
| TS:I12 | 70 | 98 | 51 | heatKeyWait | heatOnWait | fanOn | H_KEY_TIMEOUT | 78 |
| TS:I13 | 78 | 51 | 99 | heatKeyWait | coolOffWait | autoOffWait | H_KEY_TIMEOUT | 72 |
| TS:I14 | 70 | 50 | 99 | coolKeyWait | tempControlOff | autoOffWait | C_KEY_TIMEOUT | 67 |
| TS:I15 | 70 | 50 | 98 | idleWait | coolOffWait | fanOn | IDLE_TIMEOUT | 63 |
| TS:I16 | 70 | 50 | 99 | coolKeyWait | heatOffWait | fanOn | SET | 59 |
| TS:I17 | 78 | 51 | 98 | coolKeyWait | heatOffWait | autoOffWait | C_KEY_TIMEOUT | 57 |
| TS:I18 | 78 | 99 | 51 | coolKeyWait | heatOnWait | autoOnWait | C_KEY_TIMEOUT | 55 |
| TS:I19 | 70 | 99 | 50 | coolKeyWait | coolOnWait | autoOnWait | SET | 53 |
| TS:I20 | 70 | 98 | 51 | coolKeyWait | heatOnWait | fanOn | SET | 51 |
| TS:I21 | 78 | 51 | 98 | coolKeyWait | tempControlOff | fanOn | SET | 50 |
| TS:I22 | 78 | 98 | 50 | coolKeyWait | coolOnWait | fanOn | C_KEY_TIMEOUT | 49 |
The test cases in partition 1 test the transitions from all the tempSet states to the idleWait state.
All persistent pairs of current states leading to the idleWait state are included.
Each event value is paired with each of the allowed current states.
Set-up for test case TS:II1 is described below.
TS:II1 is set up starting in the idleWait state. The SET button is pressed to take the tempSet state to heatKeyWait,
and the UP or DOWN button is pressed as needed to set the heatTemp to 51.
Next the SET button is pressed to take the tempSet state to coolKeyWait,
and the UP button is pressed repeatedly to set the coolTemp to 99.
The SET button is pressed again to take the tempSet state to idleWait.
The mode switch is set to OFF, and the fan switch is set to ON.
The temperature sensor simulator is set to 70.
#2.
tempSet states to heatKeyWait
Test Case ID |
roomTemp |
heatTemp |
coolTemp |
tempSet state |
tempControl state |
fanControl state |
event |
Combo Countdown |
| 4 Values | 4 Values | 4 Values | 2 Values | 5 Values | 3 Values | 5 Values | 309 |
| TS:H1 | 70 | 51 | 99 | idleWait | tempControlOff | fanOn | SET | 288 |
| TS:H2 | 70 | 98 | 51 | heatKeyWait | heatOnWait | autoOnWait | UP[heatTemp<maxTemp] | 267 |
| TS:H3 | 78 | 50 | 99 | heatKeyWait | coolOffWait | autoOffWait | DOWN[heatTemp<=minTemp] | 246 |
| TS:H4 | 100 | 99 | 99 | heatKeyWait | heatOffWait | fanOn | UP[heatTemp>=maxTemp] | 227 |
| TS:H5 | 78 | 98 | 50 | idleWait | coolOnWait | fanOn | SET | 209 |
| TS:H6 | 70 | 51 | 98 | heatKeyWait | heatOffWait | autoOffWait | DOWN[heatTemp>minTemp] | 192 |
| TS:H7 | 78 | 99 | 51 | idleWait | heatOnWait | autoOnWait | SET | 177 |
| TS:H8 | 49 | 50 | 50 | heatKeyWait | heatOnWait | autoOnWait | DOWN[heatTemp<=minTemp] | 162 |
| TS:H9 | 70 | 50 | 98 | idleWait | coolOffWait | fanOn | SET | 149 |
| TS:H10 | 78 | 51 | 98 | heatKeyWait | tempControlOff | autoOffWait | UP[heatTemp<maxTemp] | 138 |
| TS:H11 | 70 | 99 | 50 | heatKeyWait | coolOnWait | fanOn | UP[heatTemp>=maxTemp] | 129 |
| TS:H12 | 78 | 98 | 51 | heatKeyWait | coolOnWait | autoOnWait | DOWN[heatTemp>minTemp] | 122 |
| TS:H13 | 70 | 50 | 99 | idleWait | heatOffWait | autoOffWait | SET | 117 |
| TS:H14 | 78 | 99 | 99 | heatKeyWait | tempControlOff | autoOffWait | UP[heatTemp>=maxTemp] | 112 |
| TS:H15 | 78 | 98 | 51 | heatKeyWait | heatOnWait | fanOn | DOWN[heatTemp>minTemp] | 108 |
| TS:H16 | 70 | 50 | 99 | heatKeyWait | tempControlOff | fanOn | DOWN[heatTemp<=minTemp] | 104 |
| TS:H17 | 78 | 51 | 98 | heatKeyWait | heatOffWait | fanOn | UP[heatTemp<maxTemp] | 101 |
| TS:H18 | 78 | 51 | 98 | heatKeyWait | coolOffWait | fanOn | DOWN[heatTemp>minTemp] | 99 |
| TS:H19 | 70 | 50 | 50 | heatKeyWait | coolOnWait | autoOnWait | DOWN[heatTemp<=minTemp] | 97 |
| TS:H20 | 70 | 99 | 99 | heatKeyWait | coolOffWait | autoOffWait | UP[heatTemp>=maxTemp] | 95 |
| TS:H21 | 70 | 99 | 50 | heatKeyWait | heatOnWait | autoOnWait | UP[heatTemp>=maxTemp] | 93 |
| TS:H22 | 70 | 51 | 98 | heatKeyWait | tempControlOff | fanOn | DOWN[heatTemp>minTemp] | 92 |
| TS:H23 | 70 | 51 | 98 | heatKeyWait | coolOffWait | autoOffWait | UP[heatTemp<maxTemp] | 91 |
| TS:H24 | 78 | 98 | 51 | heatKeyWait | coolOnWait | fanOn | UP[heatTemp<maxTemp] | 90 |
| TS:H25 | 70 | 50 | 99 | heatKeyWait | heatOffWait | autoOffWait | DOWN[heatTemp<=minTemp] | 89 |
| TS:H26 | 49 | 50 | 50 | heatKeyWait | heatOnWait | fanOn | DOWN[heatTemp<=minTemp] | 88 |
| TS:H27 | 100 | 99 | 99 | heatKeyWait | heatOffWait | autoOffWait | UP[heatTemp>=maxTemp] | 87 |
The test cases in partition 2 test the transitions from all allowed tempSet states to the heatKeyWait state.
(There is no transition from coolKeyWait to heatKeyWait.)
All persistent pairs of current states leading to the heatKeyWait state are included.
Each event value is paired with each of the allowed current states.
Set-up for test case TS:H2 is described below.
TS:H2 is set up starting in the idleWait state.
The SET button is pressed to take the tempSet state to heatKeyWait,
and the UP or DOWN button is pressed as needed to set the heatTemp to 98.
Next the SET button is pressed to take the tempSet state to coolKeyWait,
and the UP or DOWN button is pressed as needed to set the coolTemp to 51.
The temperature sensor simulator is set to 70.
The mode switch is set to HEAT, and the fan switch is set to AUTO.
After the tempControl and fanControl states are heatOnWait and autoOnWait,
the SET button is pressed as needed to return to the heatKeyWait state.
The UP button is pressed before the heatKeyWait timeout occurs.
#3.
tempSet states to coolKeyWait
Test Case ID |
roomTemp |
heatTemp |
coolTemp |
tempSet state |
tempControl state |
fanControl state |
event |
Combo Countdown |
| 4 Values | 4 Values | 4 Values | 2 Values | 5 Values | 3 Values | 5 Values | 309 |
| TS:C1 | 70 | 51 | 99 | heatKeyWait | tempControlOff | fanOn | SET | 288 |
| TS:C2 | 70 | 98 | 51 | coolKeyWait | heatOnWait | autoOnWait | UP[coolTemp<maxTemp] | 267 |
| TS:C3 | 78 | 50 | 50 | coolKeyWait | tempControlOff | autoOffWait | DOWN[coolTemp<=minTemp] | 246 |
| TS:C4 | 100 | 99 | 99 | coolKeyWait | coolOnWait | autoOnWait | UP[coolTemp>=maxTemp] | 226 |
| TS:C5 | 78 | 51 | 98 | coolKeyWait | coolOffWait | fanOn | DOWN[coolTemp>minTemp] | 207 |
| TS:C6 | 78 | 99 | 51 | heatKeyWait | coolOnWait | fanOn | SET | 191 |
| TS:C7 | 70 | 50 | 99 | heatKeyWait | heatOffWait | autoOffWait | SET | 177 |
| TS:C8 | 70 | 98 | 50 | heatKeyWait | heatOnWait | autoOnWait | SET | 165 |
| TS:C9 | 49 | 50 | 50 | coolKeyWait | coolOffWait | fanOn | DOWN[coolTemp<=minTemp] | 153 |
| TS:C10 | 78 | 51 | 98 | coolKeyWait | heatOffWait | fanOn | UP[coolTemp<maxTemp] | 143 |
| TS:C11 | 78 | 99 | 99 | coolKeyWait | heatOnWait | fanOn | UP[coolTemp>=maxTemp] | 135 |
| TS:C12 | 70 | 50 | 98 | heatKeyWait | coolOffWait | fanOn | SET | 128 |
| TS:C13 | 78 | 98 | 51 | coolKeyWait | coolOnWait | autoOnWait | DOWN[coolTemp>minTemp] | 121 |
| TS:C14 | 70 | 99 | 50 | coolKeyWait | coolOnWait | fanOn | DOWN[coolTemp<=minTemp] | 114 |
| TS:C15 | 70 | 51 | 98 | coolKeyWait | heatOffWait | autoOffWait | DOWN[coolTemp>minTemp] | 109 |
| TS:C16 | 78 | 50 | 99 | coolKeyWait | coolOffWait | autoOffWait | UP[coolTemp>=maxTemp] | 104 |
| TS:C17 | 78 | 51 | 98 | coolKeyWait | tempControlOff | autoOffWait | UP[coolTemp<maxTemp] | 101 |
| TS:C18 | 78 | 98 | 51 | coolKeyWait | coolOnWait | fanOn | UP[coolTemp<maxTemp] | 99 |
| TS:C19 | 70 | 50 | 50 | coolKeyWait | heatOffWait | autoOffWait | DOWN[coolTemp<=minTemp] | 97 |
| TS:C20 | 70 | 99 | 50 | coolKeyWait | heatOnWait | autoOnWait | DOWN[coolTemp<=minTemp] | 95 |
| TS:C21 | 70 | 50 | 99 | coolKeyWait | heatOffWait | autoOffWait | UP[coolTemp>=maxTemp] | 93 |
| TS:C22 | 70 | 51 | 98 | coolKeyWait | tempControlOff | fanOn | DOWN[coolTemp>minTemp] | 92 |
| TS:C23 | 70 | 51 | 98 | coolKeyWait | coolOffWait | autoOffWait | UP[coolTemp<maxTemp] | 91 |
| TS:C24 | 78 | 98 | 51 | coolKeyWait | heatOnWait | fanOn | DOWN[coolTemp>minTemp] | 90 |
| TS:C25 | 49 | 50 | 50 | coolKeyWait | coolOffWait | autoOffWait | DOWN[coolTemp<=minTemp] | 89 |
| TS:C26 | 70 | 50 | 99 | coolKeyWait | tempControlOff | fanOn | UP[coolTemp>=maxTemp] | 88 |
| TS:C27 | 100 | 99 | 99 | coolKeyWait | coolOnWait | fanOn | UP[coolTemp>=maxTemp] | 87 |
The test cases in partition 3 test the transitions from all allowed tempSet states to the coolKeyWait state.
(There is no transition from idleWait to coolKeyWait.)
All persistent pairs of current states leading to the coolKeyWait state are included.
Each event value is paired with each of the allowed current states.
|