Skip to main content
Log in

Wodel-Test: a model-based framework for language-independent mutation testing

  • Regular Paper
  • Published:
Software and Systems Modeling Aims and scope Submit manuscript

Abstract

Mutation testing (MT) targets the assessment of test cases by measuring their efficiency to detect faults. This technique involves modifying the program under test to emulate programming faults, and assessing whether the existing test cases detect such mutations. MT has been extensively studied since the 70’s, and many tools have been proposed for widely used languages like C, Java, Fortran, Ada and SQL; and for notations like Petri-nets. However, building MT tools is costly and error-prone, which may prevent their development for new programming and domain-specific (modelling) languages. In this paper, we propose a framework called Wodel-Test to reduce the effort to create MT tools. For this purpose, it follows a model-driven approach by which MT tools are synthesized from a high-level description. This description makes use of the domain-specific language Wodel to define and execute model mutations. Wodel is language-independent, as it allows the creation of mutation operators for any language defined by a meta-model. Starting from the definition of the mutation operators, Wodel-Test generates a MT environment which parses the program under test into a model, applies the mutation operators, and evaluates the test-suite against the generated mutants, offering a rich collection of MT metrics. We report on an evaluation of the approach based on the creation of MT tools for Java and the Atlas transformation language.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13

Similar content being viewed by others

Notes

  1. Wodel is built atop EMF. In EMF, it is customary to place all objects (except one, acting as root) inside some composition reference, called its container reference.

  2. https://www.eclipse.org/emf/compare/.

  3. A mutation operator may not get applied if its application conditions do not occur in the source program, or if it always produces incorrect programs.

  4. https://junit.org/junit5/.

  5. https://github.com/soursop/functional-matrix-operator.

  6. In refining mode, the input model of a transformation is changed in-place and produced as output.

References

  1. Architecture driven modernization. https://www.omg.org/adm/. Accessed Oct. (2019)

  2. Agrawal, H., DeMillo, R.A., Hathaway, B., Hsu, W., Hsu, W., Krauser, E., Martin, R., Mathur, A.P., Spafford, E.: Design of mutant operators for the C programming language. Technical report, Purdue University (1989)

  3. Aichernig, B.K., Brandl, H., Jöbstl, E., Krenn, W., Schlick, R., Tiran, S.: Killing strategies for model-based mutation testing. Softw. Test. Verif. Reliab. 25(8), 716–748 (2015)

    Article  Google Scholar 

  4. Alhwikem, F., Paige, R.F., Rose, L., Alexander, R.: A systematic approach for designing mutation operators for MDE languages. In: Workshop on Model-Driven Engineering, Verification and Validation (MoDeVVa), pp. 54–59 (2016)

  5. Alsmadi, I.M.: Using mutation to enhance GUI testing coverage. IEEE Softw. 30(1), 67–73 (2013)

    Article  Google Scholar 

  6. Andrews, J.H., Briand, L.C., Labiche, Y.: Is mutation an appropriate tool for testing experiments? In: International Conference on Software Engineering (ICSE). ACM, pp. 402–411 (2005)

  7. Aranega, V., Mottu, J.-M., Etien, A., Degueule, T., Baudry, B., Dekeyser, J.-L.: Towards an automation of the mutation analysis dedicated to model transformation. Softw. Test. Verif. Reliab. 25(5–7), 653–683 (2014)

    Google Scholar 

  8. Ariel González, G.B., Carlos, L.: Mutation testing for Java based on model-driven development. In: Simposio Latinoamericano de Ingeniería de Software (CLEI-SLISW) (in Spanish) (2018)

  9. Aziz, B.: Towards a mutation analysis of IoT protocols. Inf. Softw. Technol. 100, 183–184 (2018)

    Article  Google Scholar 

  10. Baker, R., Habli, I.: An empirical evaluation of mutation testing for improving the test quality of safety-critical software. IEEE Trans. Softw. Eng. 39(6), 787–805 (2013)

    Article  Google Scholar 

  11. Baudry, B., Ghosh, S., Fleurey, F., France, R.B., Traon, Y.L., Mottu, J.: Barriers to systematic model transformation testing. Commun. ACM 53(6), 139–143 (2010)

    Article  Google Scholar 

  12. Bradbury, J.S., Cordy, J.R., Dingel, J.: Mutation operators for concurrent Java (J2SE 5.0). In: Workshop on Mutation Analysis (Mutation), pp. 83–92 (2006)

  13. Brambilla, M., Cabot, J., Wimmer, M.: Model-Driven Software Engineering in Practice, Second Edition. Synthesis Lectures on Software Engineering. Morgan & Claypool Publishers (2017)

  14. Bruel, J., Combemale, B., Guerra, E., Jézéquel, J., Kienzle, J., de Lara, J., Mussbacher, G., Syriani, E., Vangheluwe, H.: Comparing and classifying model transformation reuse approaches across metamodels. Softw. Syst. Model. 19(2), 441–465 (2020)

    Article  Google Scholar 

  15. Brunelière, H., Cabot, J., Dupé, G., Madiot, F.: MoDisco: a model driven reverse engineering framework. Inf. Softw. Technol. 56(8), 1012–1032 (2014)

    Article  Google Scholar 

  16. Cañizares, P.C., Núñez, A., Merayo, M.G.: Mutomvo: mutation testing framework for simulated cloud and HPC environments. J. Syst. Softw. 143, 187–207 (2018)

    Article  Google Scholar 

  17. Coles, H., Laurent, T., Henard, C., Papadakis, M., Ventresque, A.: PIT: a practical mutation testing tool for Java (demo). In International Symposium on Software Testing and Analysis (ISSTA). ACM, pp. 449–452 (2016).http://pitest.org/, https://github.com/hcoles/pitest

  18. Delamaro, M.E., Maldonado.: Proteum—a tool for the assessment of test adequacy for C programs. In: Conference on Performability in Computing Systems, pp. 79–95 (1996)

  19. Delgado-Pérez, P., Medina-Bulo, I., Palomo-Lozano, F., García-Domínguez, A., Domínguez-Jiménez, J.J.: Assessment of class mutation operators for C++ with the MuCPP mutation system. Inf. Softw. Technol. 81, 169–184 (2017)

    Article  Google Scholar 

  20. DeMillo, R.A., Guindi, D.S., McCracken, W.M., Offutt, A.J., King, K.N.: An extended overview of the Mothra software testing environment. In: Workshop on Software Testing, Verification, and Analysis, pp. 142–151 (1988)

  21. DeMillo, R.A., Lipton, R.J., Sayward, F.G.: Hints on test data selection: help for the practicing programmer. IEEE Comput. 11(4), 34–41 (1978)

    Article  Google Scholar 

  22. Deng, L., Offutt, A.J., Ammann, P., Mirzaei, N.: Mutation operators for testing android apps. Inf. Softw. Technol. 81, 154–168 (2017)

    Article  Google Scholar 

  23. Denisov, A., Pankevich, S.: Mull it over: mutation testing based on LLVM. In: IEEE International Conference on Software Testing, Verification and Validation Workshops (ICSTW), pp. 25–31 (2018)

  24. Devroey, X., Perrouin, G., Papadakis, M., Legay, A., Schobbens, P., Heymans, P.: Model-based mutant equivalence detection using automata language equivalence and simulations. J. Syst. Softw. 141, 1–15 (2018)

    Article  Google Scholar 

  25. Estero-Botaro, A., Palomo-Lozano, F., Medina-Bulo, I.: Mutation operators for WS-BPEL 2.0. In: International Conference on Software & Systems Engineering and their Applications (ICSSEA) (2008)

  26. Fabbri, S.C.P.F., Delamaro, M.E., Maldonado, J.C., Masiero, P.C..: Mutation analysis testing for finite state machines. In: International Symposium on Software Reliability Engineering (ISSRE), pp. 220–229 (1994)

  27. Fabbri, S.C.P.F., Maldonado, J.C.,P.C., Masiero, M.E,. Delamaro, Wong, W.E.: Mutation testing applied to validate specifications based on Petri nets. In: International Conference on Formal Description Techniques, volume 43 of IFIP Conference Proceedings. Chapman & Hall, pp. 329–337 (1995)

  28. Fabbri, S.C.P.F., Maldonado, J.C., Sugeta, T., Masiero, P.C.: Mutation testing applied to validate specifications based on statecharts. In: International Symposium on Software Reliability Engineering (ISSRE), p. 210 (1999)

  29. Ferenc, R., Beszedes, A., Tarkiainen, M., Gyimothy, T.: Columbus—reverse engineering tool and schema for C++. In: International Conference on Software Maintenance, pp. 172–181 (2002)

  30. Fraser, G., Zeller, A.: Mutation-driven generation of unit tests and oracles. IEEE Trans. Softw. Eng. 38(2), 278–292 (2012)

    Article  Google Scholar 

  31. Gligoric, M., Badame, S., Johnson, R.: SMutant: a tool for type-sensitive mutation testing in a dynamic language. In: ACM SIGSOFT Symposium on the Foundations of Software Engineering (FSE) and European Software Engineering Conference (ESEC), pp. 424–427 (2011)

  32. GMF. https://www.eclipse.org/gmf-tooling/. Accessed Oct. 2019

  33. Gómez-Abajo, P., Guerra, E., de Lara, J.: A domain-specific language for model mutation and its application to the automated generation of exercises. Comput. Lang. Syst. Struct. 49, 152–173 (2017)

    Google Scholar 

  34. Gómez-Abajo, P., Guerra, E., de Lara, J., Merayo, M.G.: A tool for domain-independent model mutation. Sci. Comput. Program. 163, 85–92 (2018)

    Article  Google Scholar 

  35. Gómez-Abajo, P., Guerra, E., de Lara, J., Merayo, M.G.: Towards a model-driven engineering solution for language independent mutation testing. In: Jornadas de Ingeniería del Software y Bases de Datos (JISBD), p. 4. Biblioteca digital SISTEDES (2018)

  36. Gómez-Abajo, P., Guerra, E., de Lara, J., Merayo, M.G.: Mutation testing for DSLs (tool demo). In: ACM SIGPLAN International Workshop on Domain-Specific Modeling (DSM). ACM, pp. 60–62 (2019)

  37. Gong, D., Zhang, G., Yao, X., Meng, F.: Mutant reduction based on dominance relation for weak mutation testing. Inf. Softw. Technol. 81, 82–96 (2017)

    Article  Google Scholar 

  38. González-Jiménez, M., de Lara, J.: Datalyzer: streaming data applications made easy. In: International Conference on Web Engineering (ICWE), volume 10845 of LNCS. Springer, pp. 420–429 (2018)

  39. Gopinath, R., Alipour, A., Ahmed, I., Jensen, C., Groce, A.: How hard does mutation analysis have to be, anyway? In: 2015 IEEE 26th International Symposium on Software Reliability Engineering (ISSRE), pp. 216–227 (2015)

  40. Granda, M.F., Condori-Fernández, N., Vos, T.E.J., Pastor, O.: Mutation operators for UML class diagrams. In: International Conference on Advanced Information Systems Engineering (CAiSE), volume 9694 of LNCS. Springer, pp. 325–341 (2016)

  41. Groce, A., Holmes, J., Marinov, D., Shi, A., Zhang, L.: An extensible, regular-expression-based tool for multi-language mutant generation. In: International Conference on Software Engineering (ICSE). ACM, pp. 25–28 (2018)

  42. Guerra, E., Cuadrado, J.S., de Lara, J.: Towards effective mutation testing for ATL. In: ACM/IEEE International Conference on Model Driven Engineering Languages and Systems (MODELS). IEEE, pp. 78–88 (2019)

  43. Hamlet, R.G.: Testing programs with the aid of a compiler. IEEE Trans. Softw. Eng. 3(4), 279–290 (1977)

    Article  MathSciNet  Google Scholar 

  44. Heidenreich, F., Johannes, J., Karol, S., Seifert, M., Wende, C.: Derivation and refinement of textual syntax for models. In: Proceedings of ECMDA-FA, volume 5562 of Lecture Notes in Computer Science. Springer, pp. 114–129 (2009)

  45. Heidenreich, F., Johannes, J., Reimann, J., Seifert, M.., Wende, C., Werner, C., Wilke, C., Assmann, U.: Model-driven modernisation of java programs with jamopp. In: Proceedings of Model-Driven Software Migration, volume 708 CEUR Workshop Proceedings, pp. 1–4 (2011)

  46. Hierons, R.M., Merayo, M.G.: Mutation testing from probabilistic and stochastic finite state machines. J. Syst. Softw. 82(11), 1804–1818 (2009)

    Article  Google Scholar 

  47. Jia, Y., Harman, M.: MILU: a customizable, runtime-optimized higher order mutation testing tool for the full C language. In: Testing: Academic Industrial Conference—Practice and Research Techniques (TAICPART), pp. 94–98 (2008)

  48. Jia, Y., Harman, M.: Higher order mutation testing. Inf. Softw. Technol. 51(10), 1379–1393 (2009)

    Article  Google Scholar 

  49. Jia, Y., Harman, M.: An analysis and survey of the development of mutation testing. IEEE Trans. Softw. Eng. 37(5), 649–678 (2011)

    Article  Google Scholar 

  50. Jouault, F., Allilaire, F., Bézivin, J., Kurtev, I.: ATL: a model transformation tool. Sci. Comput. Program. 72(1–2), 31–39 (2008)

    Article  MathSciNet  Google Scholar 

  51. Just, R.: The Major mutation framework: efficient and scalable mutation analysis for Java. In: International Symposium on Software Testing and Analysis (ISSTA). ACM, pp. 433–436 (2014). http://mutation-testing.org/

  52. Kelly, S., Tolvanen, J.: Domain-Specific Modeling-Enabling Full Code Generation. Wiley, Hoboken (2008)

    Book  Google Scholar 

  53. Khan, Y., Hassine, J.: Mutation operators for the Atlas Transformation Language. In: International Conference on Software Testing, Verification and Validation Workshops (ICSTW), pp. 43–52 (2013)

  54. Kim, S., Clark, J.A., McDermid, J.A.: Investigating the effectiveness of object-oriented testing strategies using the mutation method. Softw. Test. Verif. Reliab. 11(3), 207–225 (2001)

    Article  Google Scholar 

  55. King, K.N., Offutt, A.J.: A Fortran language system for mutation-based software testing. Softw. Pract. Exp. 21(7), 685–718 (1991)

    Article  Google Scholar 

  56. Kintis, M., Papadakis, M., Jia, Y., Malevris, N., Traon, Y.L., Harman, M.: Detecting trivial mutant equivalences via compiler optimisations. IEEE Trans. Softw. Eng. 44(4), 308–333 (2018)

    Article  Google Scholar 

  57. Kintis, M., Papadakis, M., Papadopoulos, A., Valvis, E., Malevris, N., Traon, Y.L.: How effective are mutation testing tools? An empirical analysis of Java mutation testing tools with manual analysis and real faults. Empir. Softw. Eng. 23(4), 2426–2463 (2018)

    Article  Google Scholar 

  58. Krenn, W., Schlick, R., Tiran, S., Aichernig, B., Jobstl, E., Brandl, H.: MoMut: UML model-based mutation testing for UML. In: IEEE International Conference on Software Testing, Verification and Validation (ICST), pp. 1–8 (2015)

  59. Kusano, M., Wang, C.: CCmutator: mutation generator for concurrency constructs in multithreaded C/C++ applications. In: IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE Press, pp. 722–725 (2013)

  60. Laurent, T., Papadakis, M., Kintis, M., Henard, C., Traon, Y.L., Ventresque, A.: Assessing and improving the mutation testing practice of PIT. In: International Conference on Software Testing, Verification and Validation (ICST), pp. 430–435 (2017)

  61. Le, D., Alipour, M.A., Gopinath, R., Groce, A.: Mucheck: an extensible tool for mutation testing of haskell programs. In: International Symposium on Software Testing and Analysis (ISSTA). ACM, pp. 429–432 (2014)

  62. Le Goues, C., Nguyen, T., Forrest, S., Weimer, W.: Genprog: a generic method for automatic software repair. IEEE Trans. Softw. Eng. 38(1), 54–72 (2012)

    Article  Google Scholar 

  63. Lee, S.C., Offutt, A.J.: Generating test cases for XML-based web component interactions using mutation analysis. In: International Symposium on Software Reliability Engineering (ISSRE), pp. 200–209 (2001)

  64. López, S., Alfonzo, G.A., Perez, O., Gonzalez, S., Montes, R.: A metamodel to carry out reverse engineering of C++ code into UML sequence diagrams. In: Electronics, Robotics and Automotive Mechanics Conference (CERMA), vol. 2, pp. 331–336 (2006)

  65. Ma, Y.S., Kwon, Y.R., Offutt, A.J.: Inter-class mutation operators for Java. In: International Symposium on Software Reliability Engineering (ISSRE), pp. 352–366 (2002)

  66. Ma, Y.-S., Offutt, J., Kwon, Y.R.: MuJava: a mutation system for Java. In: International Conference on Software Engineering (ICSE), pp. 827–830 (2006)

  67. Ma, Y.-S., Offutt, J., Kwon, Y.R.: Mujava: an automated class mutation system. Softw. Test. Verif. Reliab. 15(2), 97–133 (2005)

    Article  Google Scholar 

  68. Mariya, F., Barkhas, D.: A comparative analysis of mutation testing tools for Java. In: IEEE East-West Design Test Symposium (EWDTS), pp. 1–3 (2016)

  69. Mirshokraie, S., Mesbah, A., Pattabiraman, K.: Guided mutation testing for JavaScript web applications. IEEE Trans. Softw. Eng. 41(5), 429–444 (2015)

    Article  Google Scholar 

  70. MOF. http://www.omg.org/spec/MOF (2016)

  71. Mottu, J., Baudry, B., Traon, Y.L.: Mutation analysis testing for model transformations. In: European Conference on Model Driven Architecture—Foundations and Applications (ECMDA-FA), pp. 376–390 (2006)

  72. Mottu, J., Sen, S., Tisi, M., Cabot, J.: Static analysis of model transformations for effective test generation. In: International Symposium on Software Reliability Engineering (ISSRE), pp. 291–300 (2012)

  73. Object Management Group. UML 2.4 OCL Specification (2014). http://www.omg.org/spec/OCL/

  74. Object Management Group. UML 2.5.1 Specification (2017). https://www.omg.org/spec/UML/About-UML/

  75. Offutt, A.J., Lee, A., Rothermel, G., Untch, R.H., Zapf, C.: An experimental determination of sufficient mutant operators. ACM Trans. Softw. Eng. Methodol. 5(2), 99–118 (1996)

    Article  Google Scholar 

  76. Offutt, A.J., Voas, J., Payne, J.: Mutation operators for ADA. Technical report, Information and Software Systems Engineering, George Mason University (1996)

  77. Papadakis, M., Henard, C., Harman, M., Jia, Y., Le Traon, Y.: Threats to the validity of mutation-based test assessment. In: Proceedings of the 25th International Symposium on Software Testing and Analysis, pp. 354–365 (2016)

  78. Papadakis, M., Kintis, M., Zhang, J., Jia, Y., Traon, Y.L., Harman, M.: Chapter six - mutation testing advances: an analysis and survey, volume 112 of Advances in Computers. Elsevier, pp. 275–378 (2019)

  79. Parsai, A., Murgia, A., Demeyer, S.: LittleDarwin: a feature-rich and extensible mutation testing framework for large and complex Java systems. In: Fundamentals of Software Engineering (FSEN), volume 10522 of LNCS. Springer, pp. 148–163 (2017). http://littledarwin.parsai.net/, https://github.com/aliparsai/LittleDarwin

  80. Sánchez Cuadrado, J., Guerra, E., de Lara, J.: Static analysis of model transformations. IEEE Trans. Softw. Eng. 43(9), 868–897 (2017)

    Article  Google Scholar 

  81. Schuler, D., Zeller, A.: Javalanche: efficient mutation testing for Java. In: Joint Meeting of the European Software Engineering Conference and the International Symposium on Foundations of Software Engineering. ACM, pp. 297–298 (2009). http://javalanche.org/, https://github.com/david-schuler/javalanche

  82. Sen, S., Baudry, B.: Mutation-based model synthesis in model driven engineering. In: Workshop on Mutation Analysis (Mutation) (2006)

  83. Sen, S., Baudry, B., Mottu, J.-M.: Automatic model generation strategies for model transformation testing. In: Theory and Practice of Model Transformations. Springer, Berlin, pp. 148–164 (2009)

  84. Shin, D., Jee, E., Bae, D.: Comprehensive analysis of FBD test coverage criteria using mutants. Softw. Syst. Model. 15(3), 631–645 (2016)

    Article  Google Scholar 

  85. Sirius. https://www.eclipse.org/sirius/. Accessed Oct. 2019

  86. Srivatanakul, T., Clark, J.A., Stepney, S., Polack, F.: Challenging formal specifications by mutation: a CSP security example. In: Asia-Pacific Software Engineering Conference (APSEC), pp. 340–350 (2003)

  87. Steinberg, D., Budinsky, F., Paternostro, M., Merks, E.: EMF: Eclipse Modeling Framework, 2nd Edition. Addison-Wesley Professional (2008)

  88. Trakhtenbrot, M.: New mutations for evaluation of specification and implementation levels of adequacy in testing of statecharts models. In: Workshop on Mutation Analysis (Mutation), pp. 151–160 (2007)

  89. Troya, J., Bergmayr, A., Burgueño, L., Wimmer, M.: Towards systematic mutations for and with ATL model transformations. In: International Conference on Software Testing, Verification and Validation Workshops (ICSTW), pp. 1–10 (2015)

  90. Tuya, J., Cabal, M.J.S., de la Riva, C.: SQLMutation: a tool to generate mutants of SQL database queries. In: Workshop on Mutation Analysis (Mutation), p. 1 (2006)

  91. Tuya, J., Cabal, M.J.S., de la Riva, C.: Mutating database queries. Inf. Softw. Technol. 49(4), 398–417 (2007)

    Article  Google Scholar 

  92. Voelter, M.: DSL Engineering—Designing, Implementing and Using Domain-Specific Languages. dslbook.org (2013)

  93. Wagelaar, D., Tisi, M., Cabot, J., Jouault, F.: Towards a general composition semantics for rule-based model transformation. In: ACM/IEEE International Conference on Model Driven Engineering Languages and Systems (MODELS), volume 6981 of LNCS. Springer, pp. 623–637 (2011)

  94. Wu, F., Nanavati, J., Harman, M., Jia, Y., Krinke, J.: Memory mutation testing. Inf. Softw. Technol. 81, 97–111 (2017)

    Article  Google Scholar 

  95. Yazdani, S.A., Amiri, M.J., Parsa, S., Koupaee, M.: Automatic test cases generation from business process models. Requir. Eng. 24(8), 119–132 (2018)

    Google Scholar 

  96. Zhang, L., Gligoric, M., Marinov, D., Khurshid, S.: Operator-based and random mutant selection: better together. In: Proceedings of ASE. IEEE, pp. 92–102 (2013)

Download references

Acknowledgements

This work has been partially funded by the Spanish Ministry of Science (projects RTI2018-093608-B-C31, RTI2018-095255-B-I00, TIN2015-65845-C3-1-R) and the R&D programme of the Madrid Region (project S2018/TCS-4314).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Pablo Gómez-Abajo.

Additional information

Communicated by Benoit Baudry.

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendices

Java mutation operators

This “Appendix” contains the definition of the Java mutation operators included in [17, 51, 67, 79, 81] using Wodel.

figure p
figure q
figure r
figure s

ATL mutation operators

This “Appendix” contains the definition of the ATL mutation operators proposed in [89] using Wodel.

figure t
figure u

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Gómez-Abajo, P., Guerra, E., Lara, J.d. et al. Wodel-Test: a model-based framework for language-independent mutation testing. Softw Syst Model 20, 767–793 (2021). https://doi.org/10.1007/s10270-020-00827-0

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10270-020-00827-0

Keywords

Navigation