![]() |
Testcover.com |
| ||
|
Tutorial - Thermostat Example -
tempControl Integrated Propagation 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 propagation model,
in which the effects of this region's transitions on other regions are tested.
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 15-18 of the design
procedure.
The relationship between the blocks of the tempControl integrated target state design and
those of the integrated propagation design is presented
in the tempControl mapping table.
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 40 test cases in 5 partitions in the integrated propagation design.
The results tables follow.
#1.
tempControl states to heatOffWait
The test cases in partition 1 involve transitions from the heatOnWait state to the heatOffWait state
following an increase in the roomTemp value or a decrease in the heatTemp value.
The tempControl state change then leads to a fanControl state change.
In the tempControl region tempControlOff and heatOffWait are omitted as current states
because they do not lead to observable changes in other regions.
The fanOn state also is omitted because it precludes observable changes in other regions.
(The autoOffWait state was excluded from this transition earlier due to testability issues.
However, autoOffWait as a current state also would preclude observable changes in other regions
and is omitted from the design for this reason as well.)
Set-up and expected results for TC:h2 are described below.
TC:h2 is set up by setting the temperature sensor simulator to 49, heatTemp to 50, 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 put the tempSet region into the coolKeyWait state.
The temperature sensor simulator is set to 70, and the SET button is pressed twice again,
to put the tempSet region into the heatKeyWait state
before the heatOnWait timeout occurs.
The expected results include the tempControl state going to heatOffWait, the furnace turning off,
the fanControl state going to autoOffWait, and the fan turning off.
#2.
tempControl states to heatOnWait
The test cases in partition 2 involve transitions to the heatOnWait state
either from the tempControlOff state via the mode switch,
or from the heatOffWait state following a decrease in the roomTemp value or an increase in the heatTemp value.
The tempControl state change then leads to a fanControl state change.
In the tempControl region heatOnWait is omitted as a current state
because it does not lead to observable changes in other regions.
The autoOnWait and fanOn states also are omitted because they preclude observable changes in other regions.
Set-up and expected results for TC:H1 and TC:H2 are described below.
TC:H1 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 put the tempSet region into the coolKeyWait state.
The mode switch is then set to HEAT.
The expected results include the tempControl state going to heatOnWait, the furnace turning on,
the fanControl state going to autoOnWait, and the fan turning on.
TC:H2 is set up by setting the temperature sensor simulator to 100, 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, heatOffWait, and autoOffWait,
the SET button is pressed twice to put the tempSet region into the coolKeyWait state.
The temperature sensor simulator is set to 49, and the SET button is pressed twice again,
to put the tempSet region into the heatKeyWait state
before the heatOffWait timeout occurs.
The expected results include the tempControl state going to heatOnWait, the furnace turning on,
the fanControl state going to autoOnWait, and the fan turning on.
#3.
tempControl states to coolOffWait
The test cases in partition 3 involve transitions from the coolOnWait state to the coolOffWait state
following a decrease in the roomTemp value or an increase in the coolTemp value.
The tempControl state change then leads to a fanControl state change.
In the tempControl region tempControlOff and coolOffWait are omitted as current states
because they do not lead to observable changes in other regions.
The fanOn state also is omitted because it precludes observable changes in other regions.
Set-up and expected results for TC:c2 are described below.
TC:c2 is set up by setting the temperature sensor simulator to 100, heatTemp to 79, 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 SET button is pressed twice to put the tempSet region into the coolKeyWait state.
The temperature sensor simulator is set to 49, and the SET button is pressed twice again,
to put the tempSet region into the heatKeyWait state
before the coolOnWait timeout occurs.
The expected results include the tempControl state going to coolOffWait, the air conditioner turning off,
the fanControl state going to autoOffWait, and the fan turning off.
#4.
tempControl states to coolOnWait
The test cases in partition 4 involve transitions to the coolOnWait state
either from the tempControlOff state via the mode switch,
or from the coolOffWait state following an increase in the roomTemp value or a decrease in the coolTemp value.
The tempControl state change then leads to a fanControl state change.
In the tempControl region coolOnWait is omitted as a current state
because it does not lead to observable changes in other regions.
The autoOnWait and fanOn states also are omitted because they preclude observable changes in other regions.
Set-up and expected results for TC:C1 and TC:C2 are described below.
TC:C1 is set up by setting the temperature sensor simulator to 70, 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 put the tempSet region into the coolKeyWait state.
The mode switch is then set to COOL.
The expected results include the tempControl state going to coolOnWait, the air conditioner turning on,
the fanControl state going to autoOnWait, and the fan turning on.
TC:C2 is set up by setting the temperature sensor simulator to 49, 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, coolOffWait, and autoOffWait,
the SET button is pressed twice to put the tempSet region into the coolKeyWait state.
The temperature sensor simulator is set to 70, and the SET button is pressed twice again,
to put the tempSet region into the heatKeyWait state
before the coolOffWait timeout occurs.
The expected results include the tempControl state going to coolOnWait, the air conditioner turning on,
the fanControl state going to autoOnWait, and the fan turning on.
#5.
tempControl states to tempControlOff
The test cases in partition 5 involve transitions to the tempControlOff state
from the heatOnWait or coolOnWait state via the mode switch.
The tempControl state change then leads to a fanControl state change.
In the tempControl region heatOffWait and coolOffWait are omitted as current states
because they do not lead to observable changes in other regions.
The autoOffWait and fanOn states also are omitted because they preclude observable changes in other regions.
Set-up and expected results for TC:t1 are described below.
TC:t1 is set up by setting the temperature sensor simulator to 49, heatTemp to 99, and coolTemp to 99.
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 put the tempSet region into the coolKeyWait state.
The mode switch is then set to OFF.
The expected results include the tempControl state going to tempControlOff, the furnace turning off,
the fanControl state going to autoOffWait, and the fan turning off.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|