Testcover.com Testcover.com
Tutorial - Thermostat Example -
Requirements Summary

Existing User Login
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
->Definitions of Terms
WSDL Interface
Contact Information

Requirements summary. The thermostat controls heating, cooling and fan functions to maintain room temperature according to user settings. The operation has been simplified for this example.

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 below.

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 below.

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 below.

System design notes. The temperature sensor and thermostat operate with a precision of 0.1 degree. The room temperature (roomTemp) is displayed as an integral number of degrees. The heatTemp and coolTemp settings are integral numbers of degrees. The nominal temperature variation dT is less than one degree.

Timeouts are at least a few seconds long.

Testability. The tester has access to the thermostat controls and display to set up and run tests. There are indicators to show when the furnace, air conditioner, and fan are on or off. In addition the tester can use a temperature sensor simulator to observe responses to simulated room temperature changes. There are no provisions for setting the thermostat states other than by these controls.

The timeouts are long enough for the tester to provide an input when the thermostat is in any of the lowest-level leaf states. Moreover, the tempSet timeouts exceed those of the other regions to the extent that test cases with timeout triggers for the tempControl and fanControl regions can be set up in specified tempSet states.

<Target State - Fixed Values Thermostat Test Models>

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