Testcover.com Testcover.com
Tutorial - Thermostat Example -
fanControl Integrated Target State Design

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 FactorNumber of ValuesTest Factor Values
1. roomTemp4 49 70 78 100
2. heatTemp4 50 69 79 99
3. coolTemp4 50 69 79 99
4. tempSet state3 idleWait heatKeyWait coolKeyWait
5. tempControl state5 heatOffWait heatOnWait coolOffWait coolOnWait tempControlOff
6. fanControl state3 autoOffWait autoOnWait fanOn
7. event10 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 Values4 Values4 Values3 Values3 Values3 Values3 Values206
FC:a1706979coolKeyWaittempControlOffautoOffWaitA_OFF_TIMEOUT[else]185
FC:a2785079idleWaitcoolOffWaitautoOnWaitA_ON_TIMEOUT[else]164
FC:a3789969heatKeyWaittempControlOfffanOnAUTO[else]143
FC:a4706999heatKeyWaitheatOffWaitautoOnWaitA_ON_TIMEOUT[else]124
FC:a5705099coolKeyWaitcoolOffWaitfanOnAUTO[else]107
FC:a6787950coolKeyWaittempControlOffautoOnWaitA_ON_TIMEOUT[else]91
FC:a7785099idleWaittempControlOffautoOffWaitA_OFF_TIMEOUT[else]78
FC:a8785079idleWaitheatOffWaitfanOnAUTO[else]68
FC:a9709969coolKeyWaittempControlOffautoOnWaitA_ON_TIMEOUT[else]60
FC:a10707950heatKeyWaittempControlOfffanOnAUTO[else]52
FC:a11785079heatKeyWaitcoolOffWaitautoOffWaitA_OFF_TIMEOUT[else]45
FC:a12706999idleWaitcoolOffWaitfanOnAUTO[else]40
FC:a13786999coolKeyWaitheatOffWaitautoOffWaitA_OFF_TIMEOUT[else]36
FC:a14707969idleWaittempControlOffautoOnWaitA_ON_TIMEOUT[else]33
FC:a15789950idleWaittempControlOffautoOnWaitA_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 Values2 Values2 Values3 Values2 Values3 Values6 Values201
FC:A1499969coolKeyWaitheatOnWaitautoOffWaitA_OFF_TIMEOUT[tempControl->is_in(heatOnWait)]180
FC:A2707950heatKeyWaitcoolOnWaitautoOffWaitA_OFF_TIMEOUT[tempControl->is_in(coolOnWait)]159
FC:A3789950idleWaitheatOnWaitautoOnWaitA_ON_TIMEOUT[tempControl->is_in(heatOnWait)]139
FC:A41009969heatKeyWaitcoolOnWaitfanOnAUTO[tempControl->is_in(coolOnWait)]120
FC:A5707969idleWaitcoolOnWaitautoOnWaitA_ON_TIMEOUT[tempControl->is_in(coolOnWait)]104
FC:A6787950coolKeyWaitheatOnWaitfanOnAUTO[tempControl->is_in(heatOnWait)]88
FC:A7497950heatKeyWaitheatOnWaitautoOnWaitA_ON_TIMEOUT[tempControl->is_in(heatOnWait)]79
FC:A81007950coolKeyWaitcoolOnWaitautoOnWaitA_ON_TIMEOUT[tempControl->is_in(coolOnWait)]70
FC:A91009950idleWaitcoolOnWaitautoOffWaitA_OFF_TIMEOUT[tempControl->is_in(coolOnWait)]64
FC:A10497969idleWaitheatOnWaitfanOnAUTO[tempControl->is_in(heatOnWait)]58
FC:A11789969heatKeyWaitheatOnWaitautoOffWaitA_OFF_TIMEOUT[tempControl->is_in(heatOnWait)]53
FC:A12709969coolKeyWaitcoolOnWaitfanOnAUTO[tempControl->is_in(coolOnWait)]48
FC:A13497969idleWaitheatOnWaitautoOffWaitA_OFF_TIMEOUT[tempControl->is_in(heatOnWait)]46
FC:A14709969coolKeyWaitcoolOnWaitautoOffWaitA_OFF_TIMEOUT[tempControl->is_in(coolOnWait)]44
FC:A15499969coolKeyWaitheatOnWaitautoOnWaitA_ON_TIMEOUT[tempControl->is_in(heatOnWait)]42
FC:A161009969heatKeyWaitcoolOnWaitautoOnWaitA_ON_TIMEOUT[tempControl->is_in(coolOnWait)]40
FC:A17789969heatKeyWaitheatOnWaitfanOnAUTO[tempControl->is_in(heatOnWait)]38
FC:A18707969idleWaitcoolOnWaitfanOnAUTO[tempControl->is_in(coolOnWait)]36
FC:A19497950heatKeyWaitheatOnWaitautoOffWaitA_OFF_TIMEOUT[tempControl->is_in(heatOnWait)]35
FC:A20707950heatKeyWaitcoolOnWaitfanOnAUTO[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 Values4 Values4 Values3 Values5 Values2 Values1 Value183
FC:F1706979coolKeyWaittempControlOffautoOffWaitON162
FC:F2787950heatKeyWaitcoolOnWaitautoOnWaitON141
FC:F3785099idleWaittempControlOffautoOffWaitON124
FC:F4789969coolKeyWaitheatOnWaitautoOnWaitON107
FC:F5706999heatKeyWaitheatOffWaitautoOffWaitON95
FC:F6709969idleWaitcoolOnWaitautoOnWaitON84
FC:F7785079heatKeyWaitcoolOffWaitautoOffWaitON74
FC:F8789969heatKeyWaittempControlOffautoOffWaitON67
FC:F9705099coolKeyWaitcoolOffWaitautoOffWaitON61
FC:F10707950heatKeyWaittempControlOffautoOffWaitON55
FC:F11785079idleWaitheatOffWaitautoOffWaitON50
FC:F12787950idleWaitheatOnWaitautoOnWaitON45
FC:F13706999idleWaitcoolOffWaitautoOffWaitON42
FC:F14709950coolKeyWaittempControlOffautoOnWaitON39
FC:F15707969coolKeyWaitcoolOnWaitautoOnWaitON36
FC:F16786999coolKeyWaitheatOffWaitautoOffWaitON34
FC:F17709969heatKeyWaitheatOnWaitautoOnWaitON32

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.

<fanControl Integrated Transition Definitions of Terms>

Copyright © 2003-2017 Testcover.com, LLC. All rights reserved.