An introduction to Model based Testing
The main premise behind model-based testing is to create a model, a representation of the behavior of the system under test. One way to describe the system behavior is through variables called operational modes. Operational modes dictate when certain inputs are applicable, and how the system reacts when inputs are applied under different circumstances. This information is encapsulated in the model, which is represented by a finite state transition table. In this context, a state is a valid combination of values of operational modes. Invalid combinations of these values represent situations that are physically impossible for the system under test, and are therefore excluded. Each entry in the state transition table consists of an initial state, an input that is executed, and an ending state that describes the condition of the system after the input is applied:
The model is created by taking any valid combination of values of operational modes as the initial state. All inputs that are applicable from this state are then listed, along with the new state of the software after the input is applied. As an analogy, think of a light switch that can be turned on or off. When the light is on, it can’t be turned on again; similarly when the light is already off, it can’t be turned off:
By repeating this process is for all states, a state transition table is formed that describes in great detail how the system under test behaves under all circumstances that are physically possible within the confines of the areas being modeled.
Extending the Model Based philosophy to a software
The process of developing model-based software test automation consists of the following steps:
- Exploring the system under test, by developing a model or a map of testable parts of the application.
- Domain definition: enumerating the system inputs and determine verification points in the model
- Developing the model itself.
- Generating test cases by traversing the model
- Execution and evaluation of the test cases
- Note the bugs the model missed and improve the model to catch (maybe build some intelligence)