State Transition Testing State transition testing uses the same principles as the State Transition Diagramming design technique. State transition testing focuses on the testing of transitions from one state to another state. Incorporate the state transition testing preparation into the test scenario building process.
This technique is highly beneficial to discover defects effectively.
Transitions Start/Accept state diagram It is possible to draw a state diagram based on functionality understanding. A sequence of easy to follow steps is given below: ·Draw a state transition diagram ·Draw the states ·Mark the state transitions ·Define input and output for each state transition ·Define the tests Use a State Transition Chart Use a state transition chart to identify state transitions that can occur in the real business world and state transitions that cannot occur. A sample of a state transition chart for testing illustrates this process:
STATE TRANSITION CHART FOR TESTING (Testing all valid and invalid transitions from State transition table) The following chart indicates which state transitions are possible and impossible. If a state transition is possible, a Y is placed in the column where start and accept state intersect. If a state transition is not possible, an N is placed in the column where the start and accept state intersect. The chart identifies the possible state transitions for the above Bug Tracking System, and is used to guide the sequencing of tests to ensure the system allows only appropriate state transitions.
The tester must review the test cases to identify the case actions that place the test case in a desired state. The applicable case actions are then included in the test scenario. Alternate Method:
Objective of this method is to create a set of test cases that all transitions are exercised at least once under test. This level of testing provides a good level of coverage without generating large number of tests. This level is generally the one recommend.
Steps to follow:
·Draw a state transition diagram ·Draw the states ·Identify independent Paths using Cyclomatic complexity ·Mark the state transitions ·Define input and output for each state transition ·Define tests