Tract able Model Transformation Testing Martin Gogolla 1 and Antonio Vallecillo 2 1 Database Systems Group, University of Bremen, Germany 2 GISUM/Atenea Research Group, Universidad de M´alaga, Spain gogolla@informatik.uni-bremen.de, av@lcc.uma.es Abstract. Model transformation (MT) testing is gaining interest as the size and complexity of MTs grows. In general it is very difficult and expensive (time and computational complexity-wise) to validate in full the correctness of a MT. This paper presents a MT testing approach based on the concept of Tract, which is a generalization of the concept of Model Transformation Contract. A Tract defines a set of constraints on the source and target metamodels, a set of source-target constraints, and a tract test suite, i.e., a collection of source models satisfying the source constraints. We automatically generate input test suite models, which are then transformed into output models by the transformation under test, and the results checked with the USE tool (UML-based Specification Environment) against the constraints defined for the transformation. We show the different kinds of tests that can be conducted over a MT using this automated process, and the kinds of problems it can help uncovering. 1 Introduction Model transformations are key elements of Model-driven Engineering (MDE). They allow querying, synthesizing and transforming models into other models or into code, and can also be composed in chains for building new and more powerful model transformations. As the size and complexity of model transformations grow, there is an increas- ing need to count on mechanisms and tools for testing their correctness. This is specially important in case of transformations with hundreds or thousands of rules, for which manual debugging is no longer possible—but for which we still need to check whether the produced models conform to the target metamodel, or whether some essential properties are preserved by the transformation. Testing model transformations is not an easy task and present numerous challenges [1,2,3,4]. In the literature there are two main approaches to model transformation testing (see also Section 5). In the first place we have the works that aim at fully validating the behaviour of the transformation and its associ- ated properties (confluence of the rules, termination, etc.) using formal methods and their associated toolkits (see, e.g., [5,6,7,8,9,10,11]). The potential limita- tions with these proposals lies in their inherent computational complexity, which makes them inappropriate for fully testing large and complex model transfor- mations. An alternative approach (proposed in, e.g., [12,13,14,15,16]) consists R.B. France et al. (Eds.): ECMFA 2011, LNCS 6698, pp. 221–235, 2011. c Springer-Verlag Berlin Heidelberg 2011