Introduction

TractsTool is a generic tool developed based on Eclipse. The tool has been originally developed for checking any model-to-model transformation, e.g., implemented in ATL [1], using an empirical approach, i.e. executing the transformation over a set of source models comprising a test suite and validating the correctness of the transformation using Tracts [2]. Tracts allow black-box testing imposing certain contracts that the source model, the target model, and the relationship between them must fulfil. The aim is that once the transformation is executed, the Tracts are checked and if they are fulfilled the certainty of the transformation correctness will increase.

Previously, TractsTool has been extended by two additional features. First, to reason about the alignment of specification of a model transformation given by Tracts and the implementation of the model transformation given by ATL, a matching component has been developed to produce metrics indicating the relatedness of a transformation rule and a constraint. More information on this project can be found here. Second, TractsTool has been equipped with additional features to test not only model-to-model transformations, but also model-to-text (M2T) and text-to-model (T2M) transformations.


The tool

As can be seen in the following screenshot of the TractsTool, it needs as input:

  • The source and target metamodels (conforming to the Ecore meta-metamodel)
  • The OCL [3] constraints defined by the Tracts
  • The test input model or the ASSL [4] code to generate test input model(s)
  • The ATL transformation or the output model for the given input model

As output is provided:

  • The constraints that are fulfilled by the input and output model
  • The constraints that have failed for the input and output model
  • For each failure of a constraint, we report the model element that is not fulfilling the given constraint

Support for M2T and T2M transformations

TractsTool can be used to test model-to-model transformations (M2M) as well as model-to-text (M2T) and text-to-model (T2M) transformations. The M2T and T2M testing is provided by injecting the repository of folders and files (consisting of text) to the text metamodel. For this, TractsTool provides a tab named 'T2M injector' the functionality for injecting text artifacts into models by just giving an entry point, i.e., the root directory of the text repository. Once the text models are produced by the injector, the process turns to a M2M testing problem where Tracts are checked for source and the target models. The Text metamodel can be downloaded here and can explored using the Web 2.0 Metamodel Browser here.

Examples

  • Family2Person is an example for M2M transformation testing.
  • UML2Java is a case of M2T transformation testing.
  • USE2UML is a case of T2M transformation testing.

Demo

In this link you can see a demo video with an execution of the tool: Media:Example.ogg (out of date)


Downloads

This link contains the Eclipse plugins and projects needed to execute TractsTool. In order to launch the app, you must go to the plugin named org.tracts.tool and run Model.java in src/behaviour


Limitations (provisional)

  • The metamodel name and the file name of the metamodel must be the same.
  • The metamodels must have only one package.
  • We only let primitive types as attributes types.
  • In the OCL constraints, the class names must be preceded by "src_" or "trg_" depending on if they belong to the source or target metamodel. The association names must be followed by the names of the classes among the relationship is defined in alphabetical order, e.g. if a relationship called 'owns' is defined between classes 'Person' and 'Car' we have to refer to it in the OCL constraints as 'owns_Car_Person'.
  • You must extract the files that this zip file contains in the path C:\auxTractsTool\use-3.0.0\ (probably the path does not exist so you might have to create it).

References

[1] Jouault, F., Allilaire, F., Bézivin, J., Kurtev, I.: ATL: A model transformation tool. Sci. Comput. Program. 72(1-2) (2008), pp. 31–39
[2] Gogolla, M., Vallecillo, A.: Tractable model transformation testing. In: Proceedings of the Seventh European Conference on Models Foundations and Applications (ECMFA 2011). Volume 6698 of LNCS, Birmingham, UK, Springer (2011), pp. 221–236
[3] Cabot, J., Gogolla, M.: Object Constraint Language (OCL): the Definitive Guide. In: Formal Methods for Model-Driven Engineering. Volume 7320 of LNCS, Bertinoro, Italy, Springer (2012), pp. 58-90
[4] Gogolla, M., Bohling, J., Richters, M.: Validating UML and OCL Models in USE by Automatic Snapshot Generation. Software and Systems Modeling 4(4) (2005), pp. 386–398
[5] Wimmer, M., Burgueño, L.: Testing M2T/T2M Transformations. In MODELS'13: Invited Talks, Demos, Posters, and ACM SRC. Volume 8107 of LNCS, Miami, EEUU, Springer (2013), pp. 203-219
[6] Burgueño, L., Wimmer, M., Troya, J., Vallecillo, A.: TractsTool: Testing MTs based on Contracts. In Proc. of the Poster Track of MODELS 2013. Miami, FL, EEUU, CEUR (2013). To appear.