Testcover.com Testcover.com
Tutorial - Thermostat Example -
fanControl 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
--->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. The design 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. 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 corresponding to partitions:

# autoOffWait to autoOffWait
# autoOnWait to autoOffWait
# fanOn to autoOffWait
# autoOffWait to autoOnWait
# autoOnWait to autoOnWait
# fanOn to autoOn
# autoOffWait to fanOn
# autoOnWait to fanOn

There are 3 test factors with values as follows.

Test FactorNumber of ValuesTest Factor Values
1. tempControl state3 heatOnWait coolOnWait else
2. fanControl state3 autoOffWait autoOnWait fanOn
3. 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 tempControl state else represents any state other than heatOnWait or coolOnWait. Similarly, else trigger events represent events with tempControl in any state other than heatOnWait or coolOnWait.

The test design is constructed following steps 1-6 of the design procedure. Although this is a stand-alone transition design, the fanControl region's dependence on the tempControl state requires use of the tempControl state as a test factor. Note that the values of the tempControl state factor in this design do not correspond to those for subsequent models.

The test case generator request is given below. The partition prefix FC:aa indicates the region, fanControl (FC), and the transition, e.g. autoOffWait to autoOffWait (aa), for each test case.
Thermostat Example - fanControl stand-alone transition design
tempControl state
fanControl state
event
#FC:aa autoOffWait to autoOffWait
else
autoOffWait
A_OFF_TIMEOUT[else]
#FC:Aa autoOnWait to autoOffWait
else
autoOnWait
A_ON_TIMEOUT[else]
#FC:Fa fanOn to autoOffWait
else
fanOn
AUTO[else]
#FC:aA autoOffWait to autoOnWait
heatOnWait
autoOffWait
A_OFF_TIMEOUT[tempControl->is_in(heatOnWait)]
+
coolOnWait
autoOffWait
A_OFF_TIMEOUT[tempControl->is_in(coolOnWait)]
#FC:AA autoOnWait to autoOnWait
heatOnWait
autoOnWait
A_ON_TIMEOUT[tempControl->is_in(heatOnWait)]
+
coolOnWait
autoOnWait
A_ON_TIMEOUT[tempControl->is_in(coolOnWait)]
#FC:FA fanOn to autoOnWait
heatOnWait
fanOn
AUTO[tempControl->is_in(heatOnWait)]
+
coolOnWait
fanOn
AUTO[tempControl->is_in(coolOnWait)]
#FC:aF autoOffWait to fanOn
else heatOnWait coolOnWait
autoOffWait
ON
#FC:AF autoOnWait to fanOn
else heatOnWait coolOnWait
autoOnWait
ON

The fanControl region has 15 test cases in 8 partitions in the stand-alone transition design. The results tables follow.

#1. autoOffWait to autoOffWait
Test
Case ID
tempControl state fanControl state event Combo
Countdown
1 Value1 Value1 Value3
FC:aa1elseautoOffWaitA_OFF_TIMEOUT[else]0

The test case in partition 1 tests the timeout transition from autoOffWait to autoOffWait when the tempControl state is not in heatOnWait or coolOnWait. Test case set-up is illustrated for FC:aa1 below.

FC:aa1 is set up with the mode switch set to OFF and the fan switch set to AUTO. The state of tempControl before the transition is tempControlOff, which is not heatOnWait or coolOnWait (else).

#2. autoOnWait to autoOffWait
Test
Case ID
tempControl state fanControl state event Combo
Countdown
1 Value1 Value1 Value3
FC:Aa1elseautoOnWaitA_ON_TIMEOUT[else]0

The test case in partition 2 tests the timeout transition from autoOnWait to autoOffWait when the tempControl state is not in heatOnWait or coolOnWait. Test case FC:Aa1 includes the transient pair of current states else with autoOnWait. This test case is set up with tempControl in the heatOnWait state, as illustrated below.

FC:Aa1 is set up by setting the temperature sensor simulator to 70, heatTemp to 99, and coolTemp to 49. 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 mode switch is moved from HEAT to OFF before the autoOnWait timeout occurs. The state of tempControl before the transition is tempControlOff, which is not heatOnWait or coolOnWait (else).

#3. fanOn to autoOffWait
Test
Case ID
tempControl state fanControl state event Combo
Countdown
1 Value1 Value1 Value3
FC:Fa1elsefanOnAUTO[else]0

The test case in partition 3 tests the fan switch transition from fanOn to autoOffWait when the tempControl state is not in heatOnWait or coolOnWait.

#4. autoOffWait to autoOnWait
Test
Case ID
tempControl state fanControl state event Combo
Countdown
2 Values1 Value2 Values8
FC:aA1heatOnWaitautoOffWaitA_OFF_TIMEOUT[tempControl->is_in(heatOnWait)]5
FC:aA2coolOnWaitautoOffWaitA_OFF_TIMEOUT[tempControl->is_in(coolOnWait)]2

The test cases in partition 4 test the timeout transition from autoOffWait to autoOnWait when the tempControl state is in heatOnWait or coolOnWait.

#5. autoOnWait to autoOnWait
Test
Case ID
tempControl state fanControl state event Combo
Countdown
2 Values1 Value2 Values8
FC:AA1heatOnWaitautoOnWaitA_ON_TIMEOUT[tempControl->is_in(heatOnWait)]5
FC:AA2coolOnWaitautoOnWaitA_ON_TIMEOUT[tempControl->is_in(coolOnWait)]2

The test cases in partition 5 test the timeout transition from autoOnWait to autoOnWait when the tempControl state is in heatOnWait or coolOnWait.

#6. fanOn to autoOnWait
Test
Case ID
tempControl state fanControl state event Combo
Countdown
2 Values1 Value2 Values8
FC:FA1heatOnWaitfanOnAUTO[tempControl->is_in(heatOnWait)]5
FC:FA2coolOnWaitfanOnAUTO[tempControl->is_in(coolOnWait)]2

The test cases in partition 6 test the fan switch transition from fanOn to autoOnWait when the tempControl state is in heatOnWait or coolOnWait.

#7. autoOffWait to fanOn
Test
Case ID
tempControl state fanControl state event Combo
Countdown
3 Values1 Value1 Value7
FC:aF1elseautoOffWaitON4
FC:aF2heatOnWaitautoOffWaitON2
FC:aF3coolOnWaitautoOffWaitON0

The test cases in partition 7 test the fan switch transition from autoOffWait to fanOn for any tempControl state. Test cases FC:aF2 and FC:aF3 include transient pairs of current states heatOnWait with autoOffWait and coolOnWait with autoOffWait. These test cases are set up with tempControl in the tempControlOff state, as illustrated for FC:aF2 below.

FC:aF2 is set up by setting the temperature sensor simulator to 70, heatTemp to 99, and coolTemp to 49. 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. Then the fan switch is moved from AUTO to ON before the autoOffWait timeout occurs.

#8. autoOnWait to fanOn
Test
Case ID
tempControl state fanControl state event Combo
Countdown
3 Values1 Value1 Value7
FC:AF1elseautoOnWaitON4
FC:AF2heatOnWaitautoOnWaitON2
FC:AF3coolOnWaitautoOnWaitON0

The test cases in partition 8 test the fan switch transition from autoOnWait to fanOn for any tempControl state. Test case FC:AF1 includes the transient pair of current states else with autoOnWait. This test case is set up with tempControl in the heatOnWait state, as illustrated below.

FC:AF1 is set up by setting the temperature sensor simulator to 70, heatTemp to 99, and coolTemp to 49. 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 mode switch is moved from HEAT to OFF. Then the fan switch is moved from AUTO to ON before the autoOnWait timeout occurs. The state of tempControl before the transition is tempControlOff, which is not heatOnWait or coolOnWait (else).

<tempControl Integrated Propagation fanControl Integrated Transition>

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