Test Data Generation for Model Transformations Combining Partition and Constraint Analysis
Abstract
Model-Driven Engineering (MDE) is a software engineering paradigm where models play a key role. In a MDE-based development process, models are successively transformed into other models and eventually into the final source code by means of a chain of model transformations. Since writing model transformations is an error-prone task, mechanisms to ensure their reliability are greatly needed. One way of achieving this is by means of testing. A challenging aspect when testing model transformations is the generation of adequate input test data. Most existing approaches generate test data following a black-box approach based on some sort of partition analysis that exploits the structural features of the source metamodel of the transformation. However, these analyses pay no attention to the OCL invariants of the metamodel or do it very superficially. In this paper, we propose a mechanism that systematically analyzes OCL constraints in the source metamodel in order to fine-tune this partition analysis and therefore, the generation of input test data. Our mechanism can be used in isolation, or combined with other black-box or white-box test generation approaches.