An Empirical Study of Automated Unit Test Generation for Python

11/09/2021
by   Stephan Lukasczyk, et al.
0

Various mature automated test generation tools exist for statically typed programming languages such as Java. Automatically generating 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. Our experiments confirm that evolutionary algorithms can outperform random test generation also in the context of Python, and similar to the Java world, MOSA and DynaMOSA yield the highest coverage results. However, our results demonstrate that there are still fundamental issues, such as inferring type information for code without this information, for test generation for Python to be solved.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/28/2020

Automated Unit Test Generation for Python

Automated unit test generation is an established research field, and mat...
research
02/10/2022

Pynguin: Automated Unit Test Generation for Python

Automated unit test generation is a well-known methodology aiming to red...
research
08/10/2021

PyNose: A Test Smell Detector For Python

Similarly to production code, code smells also occur in test code, where...
research
10/11/2018

An Initial Step Towards Organ Transplantation Based on GitHub Repository

Organ transplantation, which is the utilization of codes directly relate...
research
08/12/2021

Small-Amp: Test Amplification in a Dynamically Typed Language

Test amplification is a novel technique which extends a manually created...
research
03/11/2021

Using Relative Lines of Code to Guide Automated Test Generation for Python

Raw lines of code (LOC) is a metric that does not, at first glance, seem...
research
05/28/2018

Fast Random Integer Generation in an Interval

In simulations, probabilistic algorithms and statistical tests, we often...

Please sign up or login with your details

Forgot password? Click here to reset