2 Principles of the Model-driven Approach in the Context of
System Testing
Generally, model-driven testing defines a test case development strategy using a
model of the system under test [7]. Sets of test data, preconditions and test exit crite-
ria are created from the abstract functional model, representing functional and non-
functional aspects of the system. Automated test case generation becomes more and
more popular. There are two major reasons for that. The first reason is to cut time-to-
market and to deliver products faster with higher quality [8]. The popular idea, to
start testing earlier, is going to be realized in model-driven testing. During an analysis
phase models of a system, describing its functional and technical aspects, are created.
This means immediate start of the testing process without waiting for programming
activities. The second major reason to use model-driven testing is compliance to prin-
ciples of model-driven development, where models are basic system specification
documents. In this case model transformation and generalization is compliant to the
classical testing V-model [7], where the main idea of the model is not to show appro-
priate related activities, but to represent a program abstraction level (for example, to
show that system testing deals with a whole fully integrated system and user accep-
tance testing verifies and validates end-user requirements).
2.1 Modeling Artifacts in a Context of Testing
By the nature, a test case can be represented as a model, because it also consists of
elements, which describe an abstract reality. A testing model is a set of preconditions,
data inputs and expected results for some program functionality. Test case generation
in model transformation means processing of transformation rules towards system
models.
A projection of model-driven development definitions of a model, metamodel and
model transformations into a process of testing gives a possibility to define test case
generation process in terms of model transformations under main statements of mod-
el-driven approach. An appropriate metamodel should be defined before development
of a model. Metamodels are based on the Meta Object Facilities (MOF) [10].
In this paper author describes a source and test case model necessary for a system
and a test case specification. In next chapters author deals with the system source
model based on the UML state and sequence diagrams and the test case model based
on the concepts taken from the UML Testing profile [11]. The last profile provides a
standalone metamodel describing all necessary artifacts for test data management.
The UML state and sequence diagrams provide specification of a system dynamical
behavior including timing aspects.
MDD principles are based on a model transformation, where new models are
created from existent models applying special transformation. The transformation
between models is made by the transformation definition, which is a collection of
transformation rules in the form of an unambiguous specifications of the way that (a
part of) one model can be used to create (a part of) another model [9]. Transformation
rules are presented with a predefined transformation definition language. An auto-
28