An empirical study of automated unit test generation for Python

Author:

Lukasczyk StephanORCID,Kroiß Florian,Fraser GordonORCID

Abstract

AbstractVarious 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.

Funder

Universität Passau

Publisher

Springer Science and Business Media LLC

Subject

Software

Cited by 5 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Testing Quality of Service of communication system for AGV fleet with Software-Defined Network;2023 IEEE International Conference on Big Data (BigData);2023-12-15

2. Improving the Readability of Generated Tests Using GPT-4 and ChatGPT Code Interpreter;Search-Based Software Engineering;2023-12-04

3. Reproducing and Improving the BugsInPy Dataset;2023 IEEE 23rd International Working Conference on Source Code Analysis and Manipulation (SCAM);2023-10-02

4. Automatic Generation of Solidity Test for Blockchain Smart Contract using Many Objective Search and Dimensionality Reduction;2023 10th International Conference on Dependable Systems and Their Applications (DSA);2023-08-10

5. CodaMosa: Escaping Coverage Plateaus in Test Generation with Pre-trained Large Language Models;2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE);2023-05

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3