• Software Testing Dictionary
  • Home

State Transition Testing



Software testing is broadly categorized into the white box testing and black box testing. In black box testing, the output generated from a software is tested against the input data set. State transition testing is one of the concepts under black box testing. It is a test design technique which can be used to derive test cases for software features that goes through multiple states.

What is Software State Transition Testing?

The software state transition testing is conducted to verify the change in states of a software under varying inputs. If the circumstances under which the provided input are modified, then there are updates to the states of the software.

The software state transition testing comes under the black box testing and is performed to verify the characteristics of the software for multiple sets of input conditions that are fed to it in a specific order. It includes verification of both positive and negative flows. This type of testing is adopted where various state transitions of the software need to be verified.

Objectives of Software State Transition Testing

The objectives of the state transition testing are listed below −

  • The state transition testing is done to detect multiple phases of the software. These phases are interlinked to specific criterias within the software.
  • The state transition testing assists in creating the state transition diagram that describes the software’s multiple phases and their changes.
  • The state transition testing helps to verify if the software moves to proper states under different circumstances.
  • The state transition testing validates if the starting and ending states of the software are correct.
  • The state transition testing is conducted to check how the software reacts to unexpected circumstances.

Parts of Software State Transition Testing

The parts of the software state transition testing are listed below −

States − They are denoted by rectangles with rounded corners and describe the conditions of a software. Each state represents a node in the state transition diagram, where one node points to a specific state/condition.

Transitions − They are denoted by arrows and are used to indicate changes from one state to another when the software reacts to an event.

Events − They are labeled above the transition arrows. An event is an activity which brings in change in the software state.

Actions − They are denoted by message boxes. An action is a characteristic that the software generates when its state is modified.

Advantages of Software State Transition Testing

The advantages of the software state transition testing are listed below −

  • The state transition testing helps to create the state transition diagram which gives a clear picture of all the software states, and to come up with superior communication, documentation, and understanding of the complete software.
  • The state transition testing is a good test case design technique and it can incorporate both the positive and negative flows.
  • The state transition testing helps to detect defects in the early stages of the software development life cycle(SDLC) by verifying every transition in states of the software.

Disadvantages of Software State Transition Testing

The disadvantages of the software state transition testing are listed below −

  • The state transition testing may miss some of the states of the software.
  • The state transition testing does not include testing of all possible combinations of input data sets.
  • If any states are missed in the state transition testing, it results in incomplete test coverage.

Example

Let us take an example of a banking application where we would create a state transition diagram on login module features listed below −

  • User enters correct credentials in the first attempt, user logs into the banking system.
  • User enters correct credentials in the second attempt, user logs into the banking system.
  • User enters correct credentials in the third attempt, user logs into the banking system.
  • User enters correct credentials in the four attempts, user credentials are locked.
Software State Transition Testing

The total number of test cases that can be designed from the above state transition diagram are listed below −

Test Case 1 − User is in the Login Page, and then he enters the correct credentials in the first attempt, resulting in the successful login.

Test Case 2 − User is in the Login Page, and then he enters the correct credentials in the second attempt, resulting in the successful login.

Test Case 3 − User is in the Login Page, and then he enters the correct credentials in the third attempt, resulting in the successful login.

Test Case 4 − User is in the Login Page, and then he enters the incorrect credentials in the third attempt, resulting in the account locked.

Conclusion

This concludes our comprehensive take on the tutorial on Software State Transition Testing. We’ve started with describing what is a software state transition testing, what are the objectives of the software state transition testing, what are the parts of the software state transition testing, what are the advantages of software state transition testing, what are the disadvantages of software state transition testing, and an example of state transition testing. This equips you with in-depth knowledge of Software State Transition Testing. It is wise to keep practicing what you’ve learned and exploring others relevant to Software Testing to deepen your understanding and expand your horizons.

Advertisements