Automated Software Engineering

, Volume 18, Issue 2, pp 199–224 | Cite as

Example-based model-transformation testing

  • Marouane Kessentini
  • Houari Sahraoui
  • Mounir Boukadoum


A major concern in model-driven engineering is how to ensure the quality of the model-transformation mechanisms. One validation method that is commonly used is model transformation testing. When using this method, two important issues need to be addressed: the efficient generation/selection of test cases and the definition of oracle functions that assess the validity of the transformed models. This work is concerned with the latter. We propose a novel oracle function for model transformation testing that relies on the premise that the more a transformation deviates from well-known good transformation examples, the more likely it is erroneous. More precisely, the proposed oracle function compares target test cases with a base of examples that contains good quality transformation traces, and then assigns a risk level to them accordingly. Our approach takes inspiration from the biological metaphor of immune systems, where pathogens are identified by their difference with normal body cells. A significant feature of the approach is that one no longer needs to define an expected model for each test case. Furthermore, the detected faulty candidates are ordered by degree of risk, which helps the tester inspect the results. The validation results on a transformation mechanism used by an industrial partner confirm the effectiveness of our approach.


Model transformation testing Artificial immune system Traceability 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. Alanen, M., Porres, I.: Difference and union of models. In: UML’03, USA (2003) Google Scholar
  2. Baresel, A., Sthamer, H., Schmidt, M.: Fitness function design to improve evolutionary structural testing. In: GECCO 2002: Proceedings of the Genetic and Evolutionary Computation Conference, pp. 1329–1336 (2002) Google Scholar
  3. Baresel, A., Binkley, D.W., Harman, M., Korel, B.: Evolutionary testing in the presence of loop-assigned flags: A testability transformation approach. In: International Symposium on Software Testing and Analysis (ISSTA 2004), Omni Parker House Hotel, Boston, MA, July 2004, pp. 108–118 (2004). Appears in Softw. Eng. Notes 29(4) CrossRefGoogle Scholar
  4. Baudry, B., Fleurey, F., Jezequel, J.-M., Traon, Y.L.: Automatic test cases optimization using a bacteriological adaptation model: Application to .net components. In: ASE (2002) Google Scholar
  5. Baudry, B., Dinh-Trong, T., Mottu, J.-M., Simmonds, D., France, R., Ghosh, S., Fleurey, F., Traon, Y.L.: Model transformation testing challenges. In: IMDT Workshop (2006) Google Scholar
  6. Bezivin, J., Jouault, F., Valduriez, P.: On the need for megamodels. In: OOPSLA/GPCE 2004 Workshop (2004) Google Scholar
  7. Bézivin, J., Rumpe, B., Schürr, A., Tratt, L.: MTIP workshop. Available from: (2005)
  8. Brottier, E., Fleurey, F., Steel, J., Baudry, B., Traon, Y.L.: Metamodel-based test generation for model transformations: an algorithm and a tool. In: Proceedings of SSRE (2006) Google Scholar
  9. Cariou, E., Marvie, R., Seinturier, L., Duchien, L.: OCL for the specification of model transformation contracts. In: Proceedings of Workshop OCL and MDE (2004) Google Scholar
  10. Carrillo, H., Lipman, D.: The multiple sequence alignment problem in biology. SIAM J. Appl. Math. 48(5), 1072–1082 (1988) CrossRefMathSciNetGoogle Scholar
  11. Catal, C., Diri, B.: Software defect prediction using artificial immune recognition system. In: Proceedings of IASTED international Multi-Conference, pp. 285–290 (2007) Google Scholar
  12. Czarnecki, K., Helsen, S.: Classification of model transformation approaches. In: OOSPLA 2003, Anaheim, USA (2003) Google Scholar
  13. Darabos, A., Pataricza, A., Varro, D.: Towards testing the implementation of graph transformations. In: Proceedings of GT-VMT Workshop Associated to ETAPS’06, Vienna, Austria, pp. 69–80 (2006) Google Scholar
  14. Dasgupta, D., Ji, Z., Gonzalez, F.: Artificial immune system (ais) research in the last five years. In: IEEE Congress on Evolutionary Computation (1), pp. 123–130. IEEE, New York (2003) Google Scholar
  15. Falleri, J.-R., Huchard, M., Nebut, C.: Towards a traceability framework for model transformations in Kermeta. In: Proceedings of the European Conference on MDA Traceability Workshop, Bilbao, Spain (2006) Google Scholar
  16. Fleurey, F., Steel, J., Baudry, B.: Validation in model-driven engineering: testing model transformations. In: 15th IEEE International Symposium on Software Reliability Engineering (2004) Google Scholar
  17. Fleurey, F., Baudry, B., Muller, P.A., Traon, Y.: Qualifying input test data for model transformations. In: Software and Systems Modeling (2008) Google Scholar
  18. Forrest, S., Perelson, A.S., Allen, L., Kuri, R.C.: Self nonself discrimination in a computer. In: Proceedings of the 1994 IEEE Symposium on Research in Security and Privacy (1994) Google Scholar
  19. France, R., Rumpe, B.: Model-driven development of complex software: a research roadmap. In: ICSE 2007: Future of Software Engineering (2007) Google Scholar
  20. Goldberg, D.E.: Genetic Algorithms in Search, Optimization and Machine Learning. Addison-Wesley, Reading (1989) zbMATHGoogle Scholar
  21. Gonzalez, F., Dasgupta, D.: Anomaly detection using real-valued negative selection. Genet. Program. Evolv. Mach. 4(4), 383–403 (2003) CrossRefGoogle Scholar
  22. Harman, M.: The current state and future of search based software engineering. In: Proceedings of the 29th International Conference on Software Engineering (ICSE 2007), 20–26 May, Minneapolis, USA (2007) Google Scholar
  23. Kessentini, M., Sahraoui, H., Boukadoum, M.: Model transformation as an optimization problem. In: Proc. MODELS 2008. LNCS, vol. 5301, pp. 159–173. Springer, Berlin (2008) Google Scholar
  24. Kessentini, M., Sahraoui, H., Boukadoum, M.: Search-based model transformation by example. J. Softw. Syst. Model. (2010). doi: 10.1007/s10270-010-0175-7 zbMATHGoogle Scholar
  25. Khuller, S., Raghavachari, B.: Graph and network algorithms. ACM Comput. Surv. 28(1), 43–45 (1999) CrossRefGoogle Scholar
  26. Kolovos, D.S., Paige, R.F., Polack, F.A.C.: Model comparison: a foundation for model composition and model transformation testing. In: Proc. GaMMa (2006) Google Scholar
  27. Kuby, J., Kindt, T.J., Osborne, B.A., Goldsby, R.A.: Immunology, 3rd edn. Freeman, New York (1997) Google Scholar
  28. Küster, J.M.: Definition and validation of model transformations. Softw. Syst. Model. 5(3), 233–259 (2006) CrossRefGoogle Scholar
  29. Kuster, J., Abd-El-Razik, M.: Validation of model transformations—first experiences using a white box approach. In: MoDeVa’06 (2006) Google Scholar
  30. Lin, Y., Zhang, J., Gray, J.: A testing framework for model transformations. In: Model-Driven Software Development. Springer, Berlin (2005) Google Scholar
  31. McMinn, P.: Search-based software test data generation: A survey. Softw. Test. Verif. Reliab. 14(2), 105–156 (2004) CrossRefGoogle Scholar
  32. Mottu, J.-M., Baudry, B., LeTraon, Y.: Mutation analysis testing for model transformations. In: Proceedings of ECMDA’06 (European Conference on Model Driven Architecture), Bilbao, Spain (2006) Google Scholar
  33. Mottu, J.M., Baudry, B., Traon, Y.L.: Model transformation testing: Oracle issue. In: Proc. of ICST08 (2008) Google Scholar
  34. Sampath, P., Rajeev, A.C., Ramesh, S., Shashidhar, K.C.: Testing model-processing tools for embedded systems. In: IEEE Real-Time and Embedded Technology and Applications Symposium, pp. 203–214 (2007) Google Scholar
  35. Steel, J., Lawley, M.: Model-based test driven development of the Tefkat model- transformation engine. In: ISSRE’04, pp. 151–160. IEEE, New York (2004) Google Scholar
  36. Sun, Y., White, J., Gray, J.: Model transformation by demonstration. In: MoDELS09 (2009) Google Scholar
  37. Varro, D., Balogh, Z.: Automating model transformation by example using inductive logic programming. In: ACM Symposium (SAC 2007) (2007) Google Scholar
  38. Varró, D., Pataricza, A.: Automated formal verification of model transformations. In: Jürjens, J., Rumpe, B., France, R., Fernandez, E.B. (eds.) CSDUML 2003: Critical Systems Development in UML; Proceedings of the UML’03 Workshop, Technical Report, pp. 63–78. Technische Universität, München (2003) Google Scholar
  39. Wimmer, M., Strommer, M., Kargl, H., Kramler, G.: Towards model transformation generation by-example. In: HICSS-40 Hawaii International Conference on System Sciences (2007) Google Scholar

Copyright information

© Springer Science+Business Media, LLC 2011

Authors and Affiliations

  • Marouane Kessentini
    • 1
    • 2
  • Houari Sahraoui
    • 1
  • Mounir Boukadoum
    • 3
  1. 1.DIROUniversité de MontréalMontréalCanada
  2. 2.College of Computer and Information SciencesKing Saud UniversityRiyadhSaudi Arabia
  3. 3.DIUniversité du Québec à MontréalMontréalCanada

Personalised recommendations