Model Based Testing

By Anand Ramdeo on May 5, 2011 Comments

It is true that in order to test any system effectively, we need to first understand what the implementation under test is supposed to do. With continuously increasing complex software, testers can use models to understand the system and support test design process.

Dr. Kaner has rightly suggested that testing is a technical investigation; this view is similar to the observation mage by Binder (2000) in ‘Testing Object Oriented Systems’ where he looks at the testing as a search problem. In the vast amount of input, we are looking for just few inputs which will trigger the defect or faulty behaviour of the system. According to the model based testing approach, this search should be systematic, focused and automated.

In Model Based Testing, input and state combination can be enumerated systematically. In order to understand the model, it is important to understand the concept behind model first. According to Binder (2000), every model has four main elements: subject, point of view/theory, representation and technique.

Subject Is the core idea around which models are created. In testing, typically models of system under test help us in selecting effective test cases.

Point of View A model must be based on the frame of reference and principle that can guide identification of relevant issues and information. Software testing models typically express required behaviour and focus aspects of system suspected to be buggy. Models from the software testing point of view, must establish the information necessary to produce and evaluate test case.

Representation A modelling technique must have a means of expressing a particular model. This may be a wire frame, cad model or anything else.

Technique Models can be developed by using any technique using UML notion for the formal ones or even simpler artefact for general use.

Before dwelling in to the skills required to perform model based testing, let us first understand how models can be used in testing complex software and what kind of information can be revealed from the models. Following list summarizes main activities that can be done effectively with the models

Model Validation & Consistency checking Models can be validated against the rules defined in OCL, Object constraint language and meta-model.

Product Validation Product can be validated using models in more than one way. It can be tested that observable behaviour of model is appropriate and also this observable behaviour confirms to the required behaviour.

One important thing that a software tester needs to understand is how models can be used to improve the way testing is done. Techniques described above are formal techniques and are based on the assumption that models of the product being developed are in place and our testing efforts are derived from those models. Even in the absence of formal models, test team can create their own models to understand the problem domain in a better way. Bezier characterizes this (taken from Binder, 2000) in a very neat way and says

“What shall we, as testing practitioner do? As with all models, we ignore the complexities that can invalidate the model and we use what we can apply with ease. After all, models for testing are intended to give us insight into effective test case design – they are intuition joggers – so it does not matter if they are imperfect as long as the resulting tests are good. ”
blog comments powered by Disqus
Finished reading? Browse all posts »