An empirical study of automated unit test generation for Python

被引:0
|
作者
Stephan Lukasczyk
Florian Kroiß
Gordon Fraser
机构
[1] University of Passau,
来源
关键词
Dynamic typing; Python; Automated Test Generation;
D O I
暂无
中图分类号
学科分类号
摘要
Various mature automated test generation tools exist for statically typed programming languages such as Java. Automatically generating unit tests for dynamically typed programming languages such as Python, however, is substantially more difficult due to the dynamic nature of these languages as well as the lack of type information. Our Pynguin framework provides automated unit test generation for Python. In this paper, we extend our previous work on Pynguin to support more aspects of the Python language, and by studying a larger variety of well-established state of the art test-generation algorithms, namely DynaMOSA, MIO, and MOSA. Furthermore, we improved our Pynguin tool to generate regression assertions, whose quality we also evaluate. Our experiments confirm that evolutionary algorithms can outperform random test generation also in the context of Python, and similar to the Java world, DynaMOSA yields the highest coverage results. However, our results also demonstrate that there are still fundamental remaining issues, such as inferring type information for code without this information, currently limiting the effectiveness of test generation for Python.
引用
收藏
相关论文
共 50 条
  • [31] Automated bibliometric data generation in Python']Python from a bibliographic database
    Toaza, Bladimir
    Esztergar-Kiss, Domokos
    SOFTWARE IMPACTS, 2024, 19
  • [32] Generating TCP/UDP Network Data for Automated Unit Test Generation
    Arcuri, Andrea
    Fraser, Gordon
    Galeotti, Juan Pablo
    2015 10TH JOINT MEETING OF THE EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND THE ACM SIGSOFT SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING (ESEC/FSE 2015) PROCEEDINGS, 2015, : 155 - 165
  • [33] Private API Access and Functional Mocking in Automated Unit Test Generation
    Arcuri, Andrea
    Fraser, Gordon
    Just, Rene
    2017 10TH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE TESTING, VERIFICATION AND VALIDATION (ICST), 2017, : 126 - 137
  • [34] CiRA: An Open-Source Python']Python Package for Automated Generation of Test Case Descriptions from Natural Language Requirements
    Frattini, Julian
    Fischbach, Jamiik
    Bauer, Andreas
    2023 IEEE 31ST INTERNATIONAL REQUIREMENTS ENGINEERING CONFERENCE WORKSHOPS, REW, 2023, : 68 - 71
  • [35] An empirical study of fault localization in Python']Python programs
    Rezaalipour, Mohammad
    Furia, Carlo A.
    EMPIRICAL SOFTWARE ENGINEERING, 2024, 29 (04)
  • [36] The Evolution of Type Annotations in Python']Python: An Empirical Study
    Di Grazia, Luca
    Pradel, Michael
    PROCEEDINGS OF THE 30TH ACM JOINT MEETING EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, ESEC/FSE 2022, 2022, : 209 - 220
  • [37] On the Security of Python']Python Virtual Machines: An Empirical Study
    Lin, Xinrong
    Hua, Baojian
    Fan, Qiliang
    2022 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME 2022), 2022, : 223 - 234
  • [38] An Empirical Study of Dynamic Types for Python']Python Projects
    Xia, Xinmeng
    He, Xincheng
    Yan, Yanyan
    Xu, Lei
    Xu, Baowen
    SOFTWARE ANALYSIS, TESTING, AND EVOLUTION, SATE 2018, 2018, 11293 : 85 - 100
  • [39] PyXtal_FF: a python']python library for automated force field generation
    Yanxon, Howard
    Zagaceta, David
    Tang, Binh
    Matteson, David S.
    Zhu, Qiang
    MACHINE LEARNING-SCIENCE AND TECHNOLOGY, 2021, 2 (02):
  • [40] An empirical comparison of automated generation and classification techniques for object-oriented unit testing
    d'Amorim, Marcelo
    Pacheco, Carlos
    Xie, Tao
    Marinov, Darko
    Ernst, Michael D.
    ASE 2006: 21ST IEEE INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING, PROCEEDINGS, 2006, : 59 - 68