when relevant content is
added and updated.
Mastering State Transition Testing Technique is like learning to drive a car. You need to be patient while learning and practicing. But once you become proficient, everything becomes quite easy. It is a dynamic testing technique, unlike other techniques we use. This technique is quite beneficial in two conditions:
- When you define the system in a finite number of states, and
- The rules of the system control the transition between these states
Hence, the technique is useful where you consider every transforming feature of a system as a state. In such cases, the rules of thë software will govern these transformations. There are three key components in State Transition Testing. These are Original State, Action, and Final State. So whenever there is a transformation from an original state to final state, there is an action or event. And definitely, there is an input that triggers this action or event which results in an output.
State Transition Testing
Think of a scenario where you mark your attendance in your organization with the help of a swipe card. And, in fact, the same card provides you accessibility. If you swipe your card at entry, it marks your ‘in’ and automatically opens the door for you to enter. Similarly, at the exit when you swipe the same card it marks you ‘out’ and opens thë door automatically for you to move out of the building. Now let us understand State Transition Testing with the help of following steps:
- You are at the entry gate.
- Swiping your card marks your attendance and opens the door for you to enter the office.
- You enter and the gate closes after the stipulated time.
- You slide your card outside to your friend Sam to use the same card again for his entry.
- Sam swipes your card at the same entry point.
- This time there is no action and the gate does not open.
You swipe your card first time. It marks your attendance and lets you enter. Next time, you try the same action through Sam but this time it doesn’t open the door. So this time the transition, that is causing the change in state is the earlier entry.
Image source: testing excellence