skip to main content
10.1145/3532512.3532514acmotherconferencesArticle/Chapter ViewAbstractPublication PagesprogrammingConference Proceedingsconference-collections
research-article
Open access

Toward Just-in-Time and Language-Agnostic Mutation Testing

Published: 08 December 2022 Publication History

Abstract

Mutation Testing is a popular approach to determine the quality of a suite of unit tests. It is based on the idea that introducing faults into a system under test (SUT) should cause tests to fail, otherwise, the test suite might be of insufficient quality. In the language of mutation testing, such a fault is referred to as “mutation”, and an instance of the SUT’s code that contains the mutation is referred to as “mutant”. Mutation testing is computationally expensive and time-consuming. Reasons for this include, for example, a high number of mutations to consider, interrelations between these mutations, and mutant-associated costs such as the cost of mutant creation or the cost of checking whether any tests fail in response. Furthermore, implementing a reliable tool for automatic mutation testing is a significant effort for any language. As a result, mutation testing is only available for some languages.
Present mutation tools often rely on modifying code or binary executables. We refer to this as “ahead-of-time” mutation testing. Oftentimes, they neither take dynamic information that is only available at run-time into account nor alter program behavior at run-time. However, mutating via the latter could save costs on mutant creation: If the corresponding module of code is compiled, only the mutated section of code needs to be recompiled. Run-time information (like previous execution results selected by an initial test run) could help to determine the utility of a mutant. Skipping mutants of low utility could have an impact on mutation testing efficiency. We refer to this approach as just-in-time mutation testing.
In this paper, we provide a proof of concept for just-in-time and language-agnostic mutation testing. We present preliminary results of a feasibility study that explores the implementation of just-in-time mutation testing based on Truffle’s instrumentation API. Based on these results, future research can evaluate the implications of just-in-time and language-agnostic mutation testing.

References

[1]
Paul Ammann and Jeff Offutt. 2016. Introduction to software testing. Cambridge University Press.
[2]
Leonardo Bottaci. 2010. Type Sensitive Application of Mutation Operators for Dynamically Typed Programs. In 2010 Third International Conference on Software Testing, Verification, and Validation Workshops. 126–131. https://doi.org/10.1109/ICSTW.2010.56
[3]
Thierry Titcheu Chekam. 2017. Automated and Scalable Mutation Testing. In 2017 IEEE International Conference on Software Testing, Verification and Validation (ICST). IEEE, 559–560.
[4]
Michael L. Van de Vanter, Chris Seaton, Michael Haupt, Christian Humer, and Thomas Würthinger. 2018. Fast, Flexible, Polyglot Instrumentation Support for Debuggers and other Tools. Art Sci. Eng. Program. 2, 3 (2018), 14. https://doi.org/10.22152/programming-journal.org/2018/2/14
[5]
Richard A DeMillo, Richard J Lipton, and Frederick G Sayward. 1978. Hints on test data selection: Help for the practicing programmer. Computer 11, 4 (1978), 34–41.
[6]
Anna Derezinska and Konrad Hałas. 2015. Improving mutation testing process of python programs. In Software Engineering in Intelligent Systems. Springer, 233–242.
[7]
Milos Gligoric, Sandro Badame, and Ralph Johnson. 2011. SMutant: A Tool for Type-Sensitive Mutation Testing in a Dynamic Language. In Proceedings of the 19th ACM SIGSOFT Symposium and the 13th European Conference on Foundations of Software Engineering (Szeged, Hungary) (ESEC/FSE ’11). ACM, 424–427. https://doi.org/10.1145/2025113.2025181
[8]
Richard G. Hamlet. 1977. Testing programs with the aid of a compiler. IEEE transactions on software engineering4 (1977), 279–290.
[9]
Nico Jansen and Simon de Lang. 2022. StrykerJS. https://github.com/stryker-mutator/stryker
[10]
René Just, Bob Kurtz, and Paul Ammann. 2017. Inferring Mutant Utility from Program Context. In Proceedings of the 26th ACM SIGSOFT International Symposium on Software Testing and Analysis (Santa Barbara, CA, USA) (ISSTA 2017). ACM, 284–294. https://doi.org/10.1145/3092703.3092732
[11]
Yu-Seung Ma, Jeff Offutt, and Yong-Rae Kwon. 2006. MuJava: A Mutation System for Java. In Proceedings of the 28th International Conference on Software Engineering (Shanghai, China) (ICSE ’06). ACM, 827–830. https://doi.org/10.1145/1134285.1134425
[12]
Fabio Niephaus, Tim Felgentreff, and Robert Hirschfeld. 2019. GraalSqueak: Toward a Smalltalk-Based Tooling Platform for Polyglot Programming. In Proceedings of the 16th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes (Athens, Greece) (MPLR 2019). ACM, 14–26. https://doi.org/10.1145/3357390.3361024
[13]
Mike Papadakis, Marinos Kintis, Jie Zhang, Yue Jia, Yves Le Traon, and Mark Harman. 2019. Mutation testing advances: an analysis and survey. In Advances in Computers. Vol. 112. Elsevier, 275–378.
[14]
Christian Wimmer and Thomas Würthinger. 2012. Truffle: A Self-Optimizing Runtime System. In Proceedings of the 3rd Annual Conference on Systems, Programming, and Applications: Software for Humanity (Tucson, Arizona, USA) (SPLASH ’12). ACM, 13–14. https://doi.org/10.1145/2384716.2384723
[15]
Thomas Würthinger, Christian Wimmer, Andreas Wöß, Lukas Stadler, Gilles Duboscq, Christian Humer, Gregor Richards, Doug Simon, and Mario Wolczko. 2013. One VM to Rule Them All. In Proceedings of the 2013 ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming & Software(Indianapolis, Indiana, USA) (Onward! 2013). ACM, 187–204. https://doi.org/10.1145/2509578.2509581

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
Programming '22: Companion Proceedings of the 6th International Conference on the Art, Science, and Engineering of Programming
March 2022
98 pages
ISBN:9781450396561
DOI:10.1145/3532512
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 08 December 2022

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. GraalVM
  2. Truffle
  3. just-in-time
  4. language-agnostic
  5. mutation coverage
  6. mutation testing
  7. polyglot

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Conference

<Programming> '22 Companion

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 75
    Total Downloads
  • Downloads (Last 12 months)51
  • Downloads (Last 6 weeks)9
Reflects downloads up to 06 Nov 2024

Other Metrics

Citations

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

HTML Format

View this article in HTML Format.

HTML Format

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media