![]() |
Testcover.com | ![]() | ||
Tutorial - Thermostat Example -
tempSet Stand-alone Transition 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 ----->Stand-alone Transition ----->Integrated Transition ----->Integrated Target State ----->Integrated Propagation --->tempControl Designs --->fanControl Designs ->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 tempSet region,
which allows the user to set the heating and cooling temperatures.
It illustrates the stand-alone transition model,
in which the region is considered isolated from the rest of the system.
Each state transition in this region has 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 corresponding to partitions:
There are 5 test factors with values as follows.
The test design is constructed following steps 1-6 of the design
procedure.
Note that partition 5 (P5, heatKeyWait to heatKeyWait) and partition 7 (P7, coolKeyWait to coolKeyWait)
are split into three blocks each (P5B1-P5B3 and P7B1-P7B3).
P5B1 and P7B1 test the normal raising and lowering of the heatTemp and coolTemp settings.
P5B2 and P7B2 test the lower limit for setting heatTemp and coolTemp,
while P5B3 and P7B3 test the upper limit.
The test case generator request is given below.
The partition prefix TS:II indicates the region, tempSet (TS),
and the transition, e.g. idleWait to idleWait (II),
for each test case.
The tempSet region has 65 test cases in 7 partitions in the stand-alone transition design.
The results tables follow.
#1.
idleWait to idleWait
The test cases in partition 1 test the timeout of the idleWait state with various temperature variable values.
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 DOWN button is pressed repeatedly to set the heatTemp to 50.
Next the SET button is pressed to take the tempSet state to coolKeyWait,
and the DOWN button is pressed repeatedly to set the coolTemp to 50.
The SET button is pressed again to take the tempSet state to idleWait,
and the temperature sensor simulator is set to 49.
#2.
heatKeyWait to idleWait
The test cases in partition 2 test the timeout of the heatKeyWait state with various temperature variable values.
#3.
coolKeyWait to idleWait
The test cases in partition 3 test the timeout and SET transitions from the coolKeyWait state
with various temperature variable values.
Set-up for test case TS:CI2 is described below.
TS:CI2 is set up starting in the idleWait state.
The SET button is pressed to take the tempSet state to heatKeyWait,
and the UP button is pressed repeatedly to set the heatTemp to 99.
Next the SET button is pressed to take the tempSet state to coolKeyWait,
and the DOWN button is pressed repeatedly to set the coolTemp to 50.
The temperature sensor simulator is set to 50,
and the SET button is pressed again before the coolKeyWait timeout occurs.
#4.
idleWait to heatKeyWait
The test cases in partition 4 test the SET transition from the idleWait state
with various temperature variable values.
#5.
heatKeyWait to heatKeyWait
Test cases TS:HH1, TS:HH6, and TS:HH7 lower the heatTemp setting.
Test cases TS:HH3, TS:HH5, and TS:HH8 raise the heatTemp setting.
Test cases TS:HH2 and TS:HH4 test the upper and lower heatTemp limits respectively.
#6.
heatKeyWait to coolKeyWait
The test cases in partition 6 test the SET transition from the heatKeyWait state
with various temperature variable values.
#7.
coolKeyWait to coolKeyWait
Test cases TS:CC1, TS:CC6, and TS:CC7 lower the coolTemp setting.
Test cases TS:CC3, TS:CC5, and TS:CC8 raise the coolTemp setting.
Test cases TS:CC2 and TS:CC4 test the upper and lower coolTemp limits respectively.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||