[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/3701625.3701659acmotherconferencesArticle/Chapter ViewAbstractPublication PagessbqsConference Proceedingsconference-collections
research-article

Static and Dynamic Comparison of Mutation Testing Tools for Python

Published: 21 December 2024 Publication History

Abstract

Context: Mutation testing is a rigorous approach for assessing the quality of test suites by injecting faults (i.e., mutants) into software under test. Tools, such as CosmicRay and Mutpy, are examples of Mutation Testing tools for Python software programs. Problem: With different Python mutation testing tools, comparative analysis is lacking to evaluate their effectiveness in different usage scenarios. Furthermore, the evolution of these tools makes continuous evaluation of their functionalities and characteristics necessary. Method: In this work, we evaluate (statically and dynamically) four Python mutation testing tools, namely CosmicRay, MutPy, MutMut, and Mutatest. In static evaluation, we introduce a comparison framework, adapted from one previously applied to Java tools, and collected information from tool documentation and developer surveys. For dynamic evaluation, we use tests built based on those produced by Pynguin, which are improved through the application of Large Language Models (LLMs) and manual analyses. Then, the adequate test suites were cross-tested among different tools to evaluate their effectiveness in killing mutants each other. Results: Our findings reveal that CosmicRay offers superior functionalities and customization options for mutant generation compared to its counterparts. Although CosmicRay’s performance was slightly lower than MutPy in the dynamic tests, its recent updates and active community support highlight its potential for future enhancements. Cross-examination of the test suites further shows that mutation scores varied narrowly among tools, with a slight emphasis on MutPy as the most effective mutant fault model.

References

[1]
Domenico Amalfitano, Ana C. R. Paiva, Alexis Inquel, Luís Pinto, Anna Rita Fasolino, and René Just. 2022. How Do Java Mutation Tools Differ? Commun. ACM 65, 12 (Nov. 2022), 74–89. Place: New York, NY, USA Publisher: Association for Computing Machinery.
[2]
J. H. Andrews, L. C. Briand, and Y. Labiche. 2005. Is mutation an appropriate tool for testing experiments?. In XXVII International Conference on Software Engineering – ICSE’05. ACM Press, St. Louis, MO, USA, 402–411.
[3]
Austin Bingham. 2021. Cosmic Ray: mutation testing for Python. (Nov. 2021). https://github.com/sixty-north/cosmic-ray
[4]
Stéphane Ducasse, Manuel Oriol, and Alexandre Bergel. 2011. Challenges to support automated random testing for dynamically typed languages. In Proceedings of the International Workshop on Smalltalk Technologies(IWST ’11). Association for Computing Machinery, New York, NY, USA, 1–6.
[5]
Lucca Renato Guerino and Auri M. R. Vincenzi. 2023. An Experimental Study Evaluating Cost, Adequacy Effectiveness of Pynguin’s Test Sets. In 8th Brazilian Symposium on Systematic and Automated Software Testing – SAST’2023. ACM Press, Campo Grande, MS, 5–14.
[6]
Philipp Hossner, Konrad Hałas, Steven Myint, and Andreas Mueller. 2021. MutPy: a mutation testing tool for Python 3.x source code. (Nov. 2021). https://github.com/mutpy/mutpy
[7]
Anders Hovmöller. 2021. Mutmut: a Python mutation testing system. (Nov. 2021). https://hackernoon.com/mutmut-a-python-mutation-testing-system-9b9639356c78
[8]
Evan Kepner. 2011. Mutatest: Python mutation testing. (Nov. 2011). https://github.com/EvanKepner/mutatest
[9]
Marinos Kintis, Mike Papadakis, Andreas Papadopoulos, Evangelos Valvis, Nicos Malevris, and Yves Le Traon. 2018. How effective are mutation testing tools? An empirical analysis of Java mutation testing tools with manual analysis and real faults. Empirical Software Engineering 23, 4 (Aug. 2018), 2426–2463.
[10]
Tsz-On Li, Wenxi Zong, Yibo Wang, Haoye Tian, Ying Wang, Shing-Chi Cheung, and Jeff Kramer. 2023. Finding Failure-Inducing Test Cases with ChatGPT.
[11]
Stephan Lukasczyk. 2019. Generating Tests to Analyse Dynamically-Typed Programs. In 2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE, San Diego, CA, USA, 1226–1229. ISSN: 2643-1572.
[12]
Stephan Lukasczyk, Florian Kroiß, and Gordon Fraser. 2023. An empirical study of automated unit test generation for Python. Empirical Software Engineering 28, 2 (Jan. 2023), 36.
[13]
P. McMinn. 2011. Search-Based Software Testing: Past, Present and Future. In 2011 IEEE Fourth International Conference on Software Testing, Verification and Validation Workshops. IEEE, Berlin, Germany, 153–163. bibtex*[number=] ISSN:.
[14]
András Márki and Birgitta Lindström. 2017. Mutation tools for Java. In Proceedings of the Symposium on Applied Computing(SAC’17). Association for Computing Machinery, New York, NY, USA, 1364–1415.
[15]
Goran Petrović, Marko Ivanković, Gordon Fraser, and René Just. 2021. Does Mutation Testing Improve Testing Practices?. In Proceedings of the 43rd International Conference on Software Engineering(ICSE ’21). IEEE Press, Madrid, Spain, 910–921. Place: Madrid, Spain.
[16]
Mohammed Latif Siddiq, Joanna C. S. Santos, Ridwanul Hasan Tanvir, Noshin Ulfat, Fahmid Al Rifat, and Vinicius Carvalho Lopes. 2023. Exploring the Effectiveness of Large Language Models in Generating Unit Tests.
[17]
Zhao Tian, Honglin Shu, Dong Wang, Xuejie Cao, Yasutaka Kamei, and Junjie Chen. 2024. Large Language Models for Equivalent Mutant Detection: How Far Are We?. In Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis(ISSTA 2024). Association for Computing Machinery, New York, NY, USA, 1733–1745. event-place: Vienna, Austria.
[18]
TIOBE Software BV. 2024. TIOBE Index. https://www.tiobe.com/tiobe-index/
[19]
Serhat Uzunbayir and Kaan Kurtel. 2019. An Analysis on Mutation Testing Tools For C# Programming Language. In 2019 4th International Conference on Computer Science and Engineering (UBMK). IEEE, Samsun, Turkey, 439–443.
[20]
Sebastian Vogl, Sebastian Schweikl, Gordon Fraser, Andrea Arcuri, Jose Campos, and Annibale Panichella. 2021. EvoSuite at the SBST 2021 Tool Competition. In 2021 IEEE/ACM 14th International Workshop on Search-Based Software Testing (SBST). IEEE, Madrid, Spain, 28–29.
[21]
Junjie Wang, Yuchao Huang, Chunyang Chen, Zhe Liu, Song Wang, and Qing Wang. 2024. Software Testing with Large Language Models: Survey, Landscape, and Vision. https://arxiv.org/abs/2307.07221 To appear in IEEE Transactions on Software Engineering.
[22]
Zhuokui Xie, Yinghao Chen, Chen Zhi, Shuiguang Deng, and Jianwei Yin. 2023. ChatUniTest: a ChatGPT-based automated unit test generation tool.
[23]
Zhiqiang Yuan, Yiling Lou, Mingwei Liu, Shiji Ding, Kaixin Wang, Yixuan Chen, and Xin Peng. 2023. No More Manual Tests? Evaluating and Improving ChatGPT for Unit Test Generation.

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Other conferences
SBQS '24: Proceedings of the XXIII Brazilian Symposium on Software Quality
November 2024
763 pages
ISBN:9798400717772
DOI:10.1145/3701625
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: 21 December 2024

Check for updates

Author Tags

  1. Software Testing
  2. Experimental Software Engineering
  3. Automated Test Generation
  4. Coverage Testing
  5. Mutation Testing
  6. Testing Tools
  7. Python Mutation Tools

Qualifiers

  • Research-article

Funding Sources

  • FAPESP
  • CAPES
  • CNPq

Conference

SBQS 2024
SBQS 2024: XXIII Brazilian Symposium on Software Quality
November 5 - 8, 2024
Bahia, Salvador, Brazil

Acceptance Rates

Overall Acceptance Rate 35 of 99 submissions, 35%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 16
    Total Downloads
  • Downloads (Last 12 months)16
  • Downloads (Last 6 weeks)16
Reflects downloads up to 15 Jan 2025

Other Metrics

Citations

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Full Text

View this article in Full Text.

Full Text

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media