A Search Based Test Data Generation Approach for Model Transformations

  • Atif Aftab Jilani
  • Muhammad Zohaib Iqbal
  • Muhammad Uzair Khan
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8568)


Model transformations are a fundamental part of Model Driven Engineering. Automated testing of model transformation is challenging due to the complexity of generating test models as test data. In the case of model transformations, the test model is an instance of a meta-model. Generating input models manually is a laborious and error prone task. Test cases are typically generated to satisfy a coverage criterion. Test data generation corresponding to various structural testing coverage criteria requires solving a number of predicates. For model transformation, these predicates typically consist of constraints on the source meta-model elements. In this paper, we propose an automated search-based test data generation approach for model transformations. The proposed approach is based on calculating approach level and branch distances to guide the search. For this purpose, we have developed specialized heuristics for calculating branch distances of model transformations. The approach allows test data generation corresponding to various coverage criteria, including statement coverage, branch coverage, and multiple condition/decision coverage. Our approach is generic and can be applied to various model transformation languages. Our developed tool, MOTTER, works with Atlas Transformation Language (ATL) as a proof of concept. We have successfully applied our approach on a well-known case study from ATL Zoo to generate test data.


Software Testing Model Transformation (MT) ATL Search Based Testing (SBT) Structural Testing 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Baudry, B., Ghosh, S., Fleurey, F., France, R., Le Traon, Y., Mottu, J.M.: Barriers to systematic model transformation testing. Communications of the ACM 53(6), 139–143 (2010)CrossRefGoogle Scholar
  2. 2.
    Ali, S., Iqbal, M., Arcuri, A., Briand, L.: Generating Test Data from OCL Constraints with Search Techniques. IEEE Transactions on Software Engineering 39(10), 26 (2013)CrossRefGoogle Scholar
  3. 3.
    Fleurey, F., Baudry, B., Muller, P.A., Traon, Y.L.: Qualifying input test data for model transformations. Software and Systems Modeling 8(2), 185–203 (2009)CrossRefGoogle Scholar
  4. 4.
    Wang, J., Kim, S.-K., Carrington, D.: Automatic generation of test models for model transformations. In: 19th Australian Conference on Software Engineering, ASWEC 2008. IEEE (2008)Google Scholar
  5. 5.
    Sen, S., Baudry, B., Mottu, J.-M.: Automatic model generation strategies for model transformation testing. Theory and Practice of Model Transformations, 148–164 (2009)Google Scholar
  6. 6.
    Vallecillo, A., Gogolla, M., Burgueño, L., Wimmer, M., Hamann, L.: Formal specification and testing of model transformations. Formal Methods for Model-Driven Engineering, 399–437 (2012)Google Scholar
  7. 7.
    Gómez, J.J.C., Baudry, B., Sahraoui, H.: Searching the boundaries of a modeling space to test metamodels. In: 2012 IEEE Fifth International Conference on Software Testing, Verification and Validation (ICST). IEEE (2012)Google Scholar
  8. 8.
    Cariou, E., Belloir, N., Barbier, F., Djemam, N.: OCL contracts for the verification of model transformations. In: Proceedings of the Workshop the Pragmatics of OCL and Other Textual Specification Languages at MoDELS (2009)Google Scholar
  9. 9.
    Guerra, E., de Lara, J., Wimmer, M., Kappel, G., Kusel, A., Retschitzegger, W., Schönböck, J., Schwinger, W.: Automated verification of model transformations based on visual contracts. Automated Software Engineering, 1–42 (2012)Google Scholar
  10. 10.
    Wang, W., Kessentini, M., Jiang, W.: Test Cases Generation for Model Transformations from Structural Information. In: 17th European Conference on Software Maintenance and Reengineering, Genova, Italy (2013)Google Scholar
  11. 11.
    Küster, J.M., Abd-El-Razik, M.: Validation of model transformations–first experiences using a white box approach. In: Kühne, T. (ed.) MoDELS 2006. LNCS, vol. 4364, pp. 193–204. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  12. 12.
    Büttner, F., Egea, M., Cabot, J.: On verifying ATL transformations using ‘off-the-shelf’SMT solvers. In: France, R.B., Kazmeier, J., Breu, R., Atkinson, C. (eds.) MODELS 2012. LNCS, vol. 7590, pp. 432–448. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  13. 13.
    González, C.A., Cabot, J.: ATLTest: A White-Box Test Generation Approach for ATL Transformations. In: France, R.B., Kazmeier, J., Breu, R., Atkinson, C. (eds.) MODELS 2012. LNCS, vol. 7590, pp. 449–464. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  14. 14.
    McQuillan, J.A., Power, J.F.: White-box coverage criteria for model transformations. In: Model Transformation with ATL, p. 63 (2009)Google Scholar
  15. 15.
    Mottu, J.-M., Sen, S., Tisi, M., Cabot, J.: Static Analysis of Model Transformations for Effective Test Generation. In: ISSRE-23rd IEEE International Symposium on Software Reliability Engineering (2012)Google Scholar
  16. 16.
    Ali, S., Iqbal, M.Z., Arcuri, A., Briand, L.: A Search-based OCL Constraint Solver for Model-based Test Data Generation. In: 2011 IEEE 11th International Conference on Quality Software, pp. 41–50 (2011)Google Scholar
  17. 17.
    Ali, S., Iqbal, M.Z., Arcuri, A.: Improved Heuristics for Solving OCL Constraints using Search Algorithms. In: Proceeding of the Sixteen Annual Conference Companion on Genetic and Evolutionary Computation Conference Companion (GECCO). ACM, Vancouver (2014)Google Scholar
  18. 18.
    Myers, G., Badgett, T., Thomas, T., Sandler, C.: The art of software testing. Wiley (2004)Google Scholar
  19. 19.
    Wu, H., Monahan, R., Power, J.F.: Metamodel Instance Generation: A systematic literature review. arXiv preprint arXiv:1211.6322 (2012)Google Scholar
  20. 20.
    McMinn, P.: Search - based software test data generation: A survey. Software Testing, Verification and Reliability 14(2), 105–156 (2004)CrossRefGoogle Scholar
  21. 21.
    Bézivin, J., Schürr, A., Tratt, L.: Model transformations in practice workshop. In: Bruel, J.-M. (ed.) MoDELS 2005. LNCS, vol. 3844, pp. 120–127. Springer, Heidelberg (2006)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  • Atif Aftab Jilani
    • 1
  • Muhammad Zohaib Iqbal
    • 1
    • 2
  • Muhammad Uzair Khan
    • 1
  1. 1.Software Quality Engineering and Testing Laboratory (QUEST)National University of Computer & Emerging SciencesPakistan
  2. 2.SnT Centre LuxembourgLuxembourg

Personalised recommendations