|Tutorial - UML State Machines|
Existing User Login
Sign up for Risk-Free Trial
Frequently Asked Questions
Tutorial with Examples
->UML State Machines
--->Shopping Cart Example
--->Test Models, 1 Region
--->Test Models, 3 Regions
->Definitions of Terms
The next examples illustrate pairwise testing using
Unified Modeling Language (UML)
state machine diagrams.
UML is a standard software engineering modeling language created and managed by the
Object Management Group.
UML state machines can differ from traditional finite state machines in important ways.
A finite state machine can be in only one state at a time,
but a UML state machine allows for multiple regions operating concurrently.
Thus each region of a UML state machine has its own state,
and the overall operation depends on the states of all the regions.
UML state machines also can have hierarchically nested states
and actions associated with the entry and exit of the states.
A crash course in UML state machines
provides more detail about these concepts.
The purpose of these test models is to include the program variables as well as the diagrammed states, so that the pairwise test design can address the extended state systematically. Test factors include program variables, the current system state(s) and an event triggering a transition whose action causes the expected results. Each test case is set up with the system in the specified state(s) and with the program variables set to their indicated values. The transition event is applied and the results observed.
Shopping cart test designs in the following pages illustrate the design procedure
and the characteristics of these models.
The thermostat example compares test designs for a state machine with multiple regions.
The thermostat (simplified for this example)
has three regions:
The thermostat example compares test designs for a state machine with multiple regions. The thermostat (simplified for this example) has three regions:
Four pairwise test models are used to design tests of a region's operation and its interactions with other regions:
Thermostat test designs in the following pages illustrate the design procedure and the characteristics of these models.