State transition technique is a dynamic testing technique, which is used when the system is defined in terms of a finite number of states and the transitions between the states are governed by the rules of the system.
Or in other words, this technique is used when features of a system are represented as states that transform into one another. The transformations are determined by the rules of the software. The pictorial representation can be shown as:

So here we see that an entity transitions from State 1 to State 2 because of some input condition, which leads to an event that results in action and finally gives the output.
To explain it with an example:
You visit an ATM and withdraw $1000. You get your cash. Now you run out of balance and make exactly the same request of withdrawing $1000. This time ATM refuses to give you the money because of insufficient balance. So, here the transition, which caused the change in state is the earlier withdrawal
State Transition Testing Definition
Having understood what State Transition is, we can now arrive at a more meaningful definition for State Transition testing. So, it is a kind of black-box testing in which the tester has to examine the behavior of AUT (Application Under Test) against various input conditions given in a sequence.
The behavior of the system is recorded for both positive and negative test values.
When to use State Transition Testing?
State Transition testing can be employed in the following situations:
- When the application under test is a real-time system with different states and transitions encompassed.
- When the application is dependent upon the event/values/conditions of the past.
- When the sequence of events needs to be tested.
- When the application needs to be tested against a finite set of input values.
When not to use State Transition Testing?
You should not rely upon State Transition testing in the following situations:
- When testing is not required for sequential input combinations.
- When different functionalities of the application are required to be tested (more like Exploratory testing).
State Transition Testing Example in Software Testing
In the practical scenario, testers are normally given the State Transition diagrams and we are required to interpret them.
These diagrams are either given by the Business Analysts or a stakeholder and we use these diagrams to determine our test cases.
Let’s consider the below situation:
Software name – Manage_display_changes
Specifications – The software responds to input requests to change display mode for a time display device.
The Display mode can be set to one of the four values:
- Two correspond to displaying either the time or date.
- The other two when altering either the time or the date.
The different states are as follows:
- Change Mode (CM): Activation of this shall cause the display mode to move between “display time (T)” and “display date (D)”.
- Reset (R): If the display mode is set to T or D, then a “reset” shall cause the display mode to be set to “alter time (AT)” or “alter date (AD)” modes.
- Time Set (TS): Activation of this shall cause the display mode to return to T from AT.
- Date Set (DS): Activation of this shall cause the display mode to return to D from AD.
Conclusion
State Transition testing is a helpful approach when different system transitions are required to be tested for finite-state systems.
Testing an application with the concept of “Stateful Functional Testing” can give Testing Organizations a unique Test Approach for testing complex applications, which would increase test execution productivity without compromising on test coverage.
State Transition testing is a unique test approach for testing complex applications, which would increase test execution productivity without compromising on test coverage.
The limitation of this technique is that it can’t be used until and unless the system under test has only finite states
YOU MAY BE INTERESTED IN
The Art of Software Testing: Beyond the Basics
Automation testing course in Pune




