Arunkumar Khannur's Software Testing Knowledge Center

10.5. Good State Graphs and Bad State Graphs

State Graphs by nature are abstract models of behaviour of the system. As such, while building state graph, we need to select relevant states, inputs, and transitions and thereby ignore irrelevant ones. In the software test design context, we need to deal with good as well as bad state graphs.

In order to judge whether state graph is good one, we can use following principles:

  1. The total number of states in a given state graph is equal to product of the possibilities of factors that make up the state.
  2. For every state and input, there is a unique transition to exactly one state and may be the same state itself
  3. For every transition there is one specific output action.
  4. For every state there is a sequence of inputs that will drive the system back to the same state

Bad state graphs can exhibit certain properties like the following:

  1. No exit node which does not allow to leave the state graph. This situation violates the principle of requirement of atleast one exit point. This is as depicted in the following Figure.

  2. Transition does not permit entry into a particular node. This is as shown below:

  3. No transition can be made from State A and State B and thus States A and B become non-reachable. This is as shown below:

  4. 4. No unique transition for a the same input thereby violating the principle that there shall be unique transition for a specific input. This is as shown below:

The above ones are few examples of improper state graphs
Khannur's Book
Arunkumar Khannur, Software Testing - Techniques and Applications, Published by Pearson Publications, 2011 (ISBN:978-81-317-5836-6; Pages:341 + xxii)
Follow Khannur
Khannur's Company
ISQT Process & Consulting Services Pvt. Ltd., Bangalore, INDIA
Khannur's Software Testing Forum
 Contact Khannur
ISQT Process & Consulting Services Pvt. Ltd.
#732, 1st Floor, 12th Main,
3rd Block, Rajajinagar,
Bangalore - 560010, INDIA
Phone: +91 80 23012511
Skype: arun.isqt