![]() |
Testcover.com |
| ||
|
Tutorial - Thermostat Example -
tempControl Integrated Target State Design | ||||
|
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 --->tempControl Designs ----->Stand-alone Transition ----->Integrated Transition ----->Integrated Target State ----->Integrated Propagation --->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 tempControl region,
which controls the heating and cooling according to the operating mode selected by the user.
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.
The user selects the temperature control mode with a sliding switch that indicates the mode: OFF, HEAT or COOL.
In the OFF mode there is no heating or cooling.
In the HEAT mode, the thermostat turns the furnace on when the room temperature is less than the heat setting.
It turns the furnace off when the room temperature exceeds the heat setting by a small increment.
In the COOL mode, the thermostat turns the air conditioner on when the room temperature is greater than the cool setting.
It turns the air conditioner off when the room temperature is less than the cool setting by a small increment.
Details of the temperature control operation are defined
in the tempControl region of the UML state machine diagram.
Test model.
In the tempControl region
there are 5 leaf states: heatOffWait, heatOnWait, coolOffWait, coolOnWait, tempControlOff.
There are 16 state transitions which are grouped into 5 partitions according to their target states:
There are 7 test factors with values as follows.
The test design is constructed following steps 12-14 of the design
procedure.
The relationship between the blocks of the tempControl integrated transition design and
those of the integrated target state design is presented
in the tempControl mapping table.
All the tempControl partitions with transitions leading to a particular target state are combined into one partition.
The 16 previous partitions are combined into 5 partitions in this design.
The test case generator request is given below.
The partition prefix TC:h indicates the region, tempControl (TC),
and the target state, e.g. heatOffWait (h),
for each test case.
The tempControl region has 66 test cases in 5 partitions in the integrated target state design.
The results tables follow.
#1.
tempControl states to heatOffWait
The test cases in partition 1 test the transitions from all allowed tempControl states to the heatOffWait state.
(There are no transitions from coolOffWait or coolOnWait.)
The constraints among the current states are the same as those in the tempControl integrated transition design.
All allowed pairs of current states leading to the heatOffWait state are included.
Each event value is paired with each of the allowed current states.
Test case TC:h4 includes the transient pair of current states tempControlOff with autoOnWait.
It is set up with tempControl in the coolOnWait state, as illustrated below.
TC:h4 is set up by setting the temperature sensor simulator to 100, heatTemp to 50, and coolTemp to 50.
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 SET button is pressed to take the tempSet state to heatKeyWait.
The mode switch is moved from COOL through OFF to HEAT before the heatKeyWait and autoOnWait timeouts occur.
#2.
tempControl states to heatOnWait
The test cases in partition 2 test the transitions from all allowed tempControl states to the heatOnWait state.
(There are no transitions from coolOffWait or coolOnWait.)
The constraints among the current states are the same as those in the tempControl integrated transition design.
All allowed pairs of current states leading to the heatOnWait state are included.
Each event value is paired with each of the allowed current states.
Test case TC:H4 includes the transient pair of current states tempControlOff with autoOnWait.
It is set up with tempControl in the heatOnWait state, as illustrated below.
TC:H4 is set up by setting the temperature sensor simulator to 78, heatTemp to 79, 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 to take the tempSet state to heatKeyWait.
The mode switch is moved from HEAT to OFF and back to HEAT before the heatKeyWait and autoOnWait timeouts occur.
#3.
tempControl states to coolOffWait
The test cases in partition 3 test the transitions from all allowed tempControl states to the coolOffWait state.
(There are no transitions from heatOffWait or heatOnWait.)
The constraints among the current states are the same as those in the tempControl integrated transition design.
All allowed pairs of current states leading to the coolOffWait state are included.
Each event value is paired with each of the allowed current states.
Test case TC:c4 includes the transient pair of current states tempControlOff with autoOnWait.
It is set up with tempControl in the heatOnWait state, as illustrated below.
TC:c4 is set up by setting the temperature sensor simulator to 78, heatTemp to 79, and coolTemp to 79.
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 to take the tempSet state to heatKeyWait.
The mode switch is moved from HEAT through OFF to COOL before the heatKeyWait and autoOnWait timeouts occur.
#4.
tempControl states to coolOnWait
The test cases in partition 4 test the transitions from all allowed tempControl states to the coolOnWait state.
(There are no transitions from heatOffWait or heatOnWait.)
The constraints among the current states are the same as those in the tempControl integrated transition design.
All allowed pairs of current states leading to the coolOnWait state are included.
Each event value is paired with each of the allowed current states.
Test case TC:C4 includes the transient pair of current states tempControlOff with autoOnWait.
It is set up with tempControl in the coolOnWait state, as illustrated below.
TC:C4 is set up by setting the temperature sensor simulator to 100, heatTemp to 79, and coolTemp to 50.
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 SET button is pressed to take the tempSet state to heatKeyWait.
The mode switch is moved from COOL to OFF and back to COOL before the heatKeyWait and autoOnWait timeouts occur.
#5.
tempControl states to tempControlOff
The test cases in partition 5 test the transitions from all allowed tempControl states to the tempControlOff state.
(There is no transition from tempControlOff.)
The constraints among the current states are the same as those in the tempControl integrated transition design.
All allowed pairs of current states leading to the tempControlOff state are included.
The event value (OFF) is paired with each of the allowed current states.
Six test cases include one of 4 transient pairs of current states:
TC:t3 is set up by setting the temperature sensor simulator to 78, heatTemp to 79, and coolTemp to 79.
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 to take the tempSet state to heatKeyWait.
The mode switch is moved from HEAT through OFF to COOL and back to OFF before the heatKeyWait and autoOnWait timeouts occur.
TC:t6 is set up by setting the temperature sensor simulator to 70, heatTemp to 69, 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 to take the tempSet state to heatKeyWait.
The mode switch is moved from OFF to COOL and back to OFF before the heatKeyWait and autoOffWait timeouts occur.
TC:t7 is set up by setting the temperature sensor simulator to 100, heatTemp to 50, and coolTemp to 50.
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 SET button is pressed to take the tempSet state to heatKeyWait.
The mode switch is moved from COOL through OFF to HEAT and back to OFF before the heatKeyWait and autoOnWait timeouts occur.
TC:t9 is set up by setting the temperature sensor simulator to 78, heatTemp to 79, 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 mode switch is moved from OFF to HEAT and back to OFF before the autoOffWait timeout occurs.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|