![]() |
Testcover.com |
| ||
|
Tutorial - Thermostat Example -
tempSet 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 ----->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 propagation model,
in which the effects of this region's transitions on other regions are tested.
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:
The tempSet integrated propagation design
is based on the previous, integrated target state design.
However, in the integrated propagation model, combinations of states, trigger events, and program variable values
are selected to test the tempSet interactions with the other regions.
Some blocks from the integrated target state model are not included in the integrated propagation model
when they do not affect other regions according to the state machine diagram.
Similarly, test factor values which do not cause observable interactions with other regions are excluded.
There are 7 test factors with values as follows.
The event DOWN[heatTemp>minTemp]x2 or UP[coolTemp<maxTemp]x2 represents 2 presses of the corresponding button
to turn off the furnace or air conditioner.
The test design is constructed following steps 15-18 of the design
procedure.
The relationship between the blocks of the tempSet integrated target state design and
those of the integrated propagation design is presented
in the tempSet mapping table.
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.
The tempSet region has 34 test cases in 3 partitions in the integrated propagation design.
The results tables follow.
#1.
tempSet states to idleWait
The test cases in partition 1 involve roomTemp changes associated with transitions to the idleWait state.
The roomTemp changes lead to tempControl state changes, and possibly fanControl state changes.
The tempControlOff state is omitted because it precludes observable changes in other regions.
Set-up and expected results for two examples, TS:I1 and TS:I4, are described below.
TS:I1 is set up by setting the temperature sensor simulator to 100, heatTemp to 98, and coolTemp to 50.
The mode switch is set to HEAT, and the fan switch is set to AUTO.
After the current states of the regions are as given by the test case, the temperature sensor simulator is set to 70.
The idleWaitState timeout, IDLE_TIMEOUT, is the trigger event.
The expected results include the roomTemp being set to 70, the tempControl state going to heatOnWait, the furnace turning on,
the fanControl state going to autoOnWait, and the fan turning on.
TS:I4 is set up by setting the temperature sensor simulator to 100, heatTemp to 51, and coolTemp to 99.
The mode switch is set to COOL, and the fan switch is set to ON.
After the tempSet, tempControl, and fanControl states are idleWait, CoolOnWait, and fanOn,
the SET button is pressed twice to put the tempSet region into the coolKeyWait state.
The temperature sensor simulator is set to 78, and the SET button is pressed again,
before the coolKeyWait timeout occurs.
The expected results include the roomTemp being set to 78, the tempControl state going to coolOffWait,
the air conditioner turning off, and the fanControl state remaining in fanOn.
#2.
tempSet states to heatKeyWait
The test cases in partition 2 involve heatTemp changes associated with transitions to the heatKeyWait state.
The heatTemp changes lead to tempControl state changes, and possibly fanControl state changes.
The current tempSet state must be heatKeyWait to change the heatTemp value.
The tempControlOff, coolOffWait, and coolOnWait states are omitted because they preclude observable changes in other regions.
Set-up and expected results for TS:H2 are described below.
TS:H2 is set up by setting the temperature sensor simulator to 51, heatTemp to 52, 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 event (actually 2 events) is 2 DOWN button presses.
The expected results include the heatTemp being set to 50, the tempControl state going to heatOffWait,
the furnace turning off, the fanControl state going to autoOffWait, and the fan turning off.
#3.
tempSet states to coolKeyWait
The test cases in partition 3 involve coolTemp changes associated with transitions to the coolKeyWait state.
The coolTemp changes lead to tempControl state changes, and possibly fanControl state changes.
The current tempSet state must be coolKeyWait to change the coolTemp value.
The tempControlOff, heatOffWait, and heatOnWait states are omitted because they preclude observable changes in other regions.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|