Chapter 15. State Transition Diagram Exercise
In this chapter, you’ll work through a series of exercises related to state testing. In this first exercise, you’ll create a state transition diagram for the Omninet kiosks, then build test cases to cover that diagram.
Kiosk States
The public Internet access kiosks can be in various states based on receipt of payment and active sessions. As you do the exercise, refer to the Marketing Requirements Document and the System Requirements Document for Omninet.
The exercise is three parts:
Draw a state diagram for the kiosk.
Create a state table to identify additional state/event combinations.
Create test cases based on that diagram.
I suggest 60 minutes as a time limit. When you’re done, keep reading to see my solution.
My Solution and Comments
First, I drew the state transition diagram, as shown in Figure 15-1.[1] Notice that the model views the world from the kiosk’s point of view. The transitions in this diagram are defined in the Marketing Requirements Document and System Requirements Document.
Figure 15-1. Kiosk state transition diagram
In the course of drawing the diagram, I discovered the following issues in the Marketing Requirements Document and the System Requirements Document:
What happens if the system encounters a serious problem while running? Should it try to initialize itself? Should the current customer — if any — receive a refund?
What ...
Get Pragmatic Software Testing: Becoming an Effective and Efficient Test Professional now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.