State Transition in Software Testing
State Transition Testing is a type of black box testing which helps to determine the change in state or output in the Application Under Test according to the changes made in input. This helps to test the application under different input parameters (Positive or negative inputs) and observe the system behavior.
When to use State Transition?
This type of testing is helpful when the tester needs to test the system for finite number of inputs. It can determine different system transitions for sequence of inputs. But, this is not suitable for exploratory testing and for systems that has an exponential growth in the input parameters as well. The tester always needs to have a clear vision on the inputs and respective output from the system.
Components of State Transition model
A State transition model consisted of two main components, such as State and Transition.
State transition can be presented in a State Transition Diagram or State Transition Table. In a State Transition Diagram, the States are represented by a box and the transitions by arrows.
In the table states are described in the left, events are described on the top. Each cell represents the system state after the event is occurred.
Example: A login screen where the user has to provide the correct username and password to login to the system. User will be given three attempts to provide the correct credentials and if the the system will be locked if user is unable to provide correct credentials within these three attempts. Correct combination of username and password with grant access to the system
Advantages and Disadvantages of State Transition Testing
Advantages
- State Transition Model provides a graphical or tabular representation of the System behavior which makes it easy to understand the testing scenarios for the tester. Hence, the testing team does not miss any path to test which makes it easy to verify the all conditions are covered and the results are captured.
Disadvantage
1. This method is not suitable for exploratory testing.
2. If the System does not have finite number of inputs and outputs where the functionalities are in sequential order, this method is not practical.