Illegal and multiple transitions

Component Testing for C++

When dealing with state or transition diagrams, Component Testing for C++ adds a custom observation state, which is both the initial state and error state. All user-defined states can make a transition towards the initial/error state, and this state can transition towards all user-defined states.

At the beginning of test execution, the object is in the initial/error state.

During the test, the object is continuously tested to comply to the user-defined STATEs and TRANSITIONs. There are three possible cases.

  • The transition can be fired to a single state: the current state is set.

  • The transition cannot be fired to any of the defined states: in this case, the state switches to the observation state and Component Testing for C++ generates an ILLEGAL TRANSITION note.

  • The transitions can be fired to two or more states. In this case, the transition diagram is no longer unambiguous. The state is set to the observation state and Component Testing for C++ generates a MULTIPLE TRANSITION.

When the state diagram is in the initial/error state, the transition is still continuously checked, however all user defined states can be potentially fired.