Tuesday, May 4, 2010

State Transition Testing Technique with example

How to perform State Transition testing technique with example

State Transition Testing

· Models each state a system can exist in

• Models each state transition

• Defines for each state transition

1. start state

2. input

3. output

4. finish state

The process for state transition testing:

a. draw state transition diagram

b. determine start state, input, output and finish state

c. determine coverage level to be achieved (1-switch/switch coverage for these exercises)

d. draw testing tree

e. define tests

When simple one transition complete at that time, it is called 0-switch coverage. If again perform loop then it is called I-switch coverage.

For example

Electric toothbrush

A two-speed electric toothbrush is operated by pressing its one button. The first press of the

button turns the toothbrush from off to speed one, the second press of the button turns it to

speed two When the button is pressed for a third time the electric toothbrush is turned off.

2 comments: