Automated Unit Test Generation for Python
Not on the map. Why?
Abstract (arXiv)
Automated unit test generation is an established research field, and mature test generation tools exist for statically typed programming languages such as Java. It is, however, substantially more difficult to automatically generate supportive tests for dynamically typed programming languages such as Python, due to the lack of type information and the dynamic nature of the language. In this paper, we describe a foray into the problem of unit test generation for dynamically typed languages. We introduce Pynguin, an automated unit test generation framework for Python. Using Pynguin, we aim to empirically shed light on two central questions: (1) Do well-established search-based test generation methods, previously evaluated only on statically typed languages, generalise to dynamically typed languages? (2) What is the influence of incomplete type information and dynamic typing on the problem of automated test generation? Our experiments confirm that evolutionary algorithms can outperform random test generation also in the context of Python, and can even alleviate the problem of absent type information to some degree. However, our results demonstrate that dynamic typing nevertheless poses a fundamental issue for test generation, suggesting future work on integrating type inference.
Key facts. Cited by 18 papers in the map (data through 7 Oct 2026). First posted on arXiv 28 Jul 2020.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 1; 2022: 1; 2023: 3; 2024: 6; 2025: 5; 2026: 2.
18 papers.
Sort:
By area:
- 2022Execution-Based Evaluation for Open-Domain Code Generationcited by 89
- 2024Code-Aware Prompting: A study of Coverage Guided Test Generation in Regression Setting using LLMcited by 63
- 2023Knowledge Transfer from High-Resource to Low-Resource Programming Languages for Code LLMscited by 45
- 2024Data-driven Discovery with Large Generative Modelscited by 33
- 2024LLM-Powered Test Case Generation for Detecting Bugs in Plausible Programscited by 14
- 2025LLM Test Generation via Iterative Hybrid Program Analysiscited by 9
- 2023Two is Better Than One: Digital Siblings to Improve Autonomous Driving Testingcited by 8
- 2023LExecutor: Learning-Guided Executioncited by 7
- 2025MultiFileTest: A Multi-File-Level LLM Unit Test Generation Benchmark and Impact of Error Fixing Mechanismscited by 4
- 2024Semi-Instruct: Bridging Natural-Instruct and Self-Instruct for Code Large Language Modelscited by 3
- 2024CSEPrompts: A Benchmark of Introductory Computer Science Promptscited by 3
- 2025Treefix: Enabling Execution with a Tree of Prefixescited by 2
6 more
- 2025GitChameleon 2.0: Evaluating AI Code Generation Against Python Library Version Incompatibilitiescited by 2
- 2025Automated Unit Test Case Generation: A Systematic Literature Reviewcited by 1
- 2026SCATE: Learning to Supervise Coding Agents for Cost-Effective Test Generationcited by 1
- 2021Automated Support for Unit Test Generation: A Tutorial Book Chaptercited by 0
- 2024Beyond Accuracy: An Empirical Study on Unit Testing in Open-source Deep Learning Projectscited by 0
- 2026AgentExecutor: Partial Code Execution via Agentic Context Generationcited by 0
- 2026AgentExecutor: Partial Code Execution via Agentic Context Generation6 Aug 2026
- 2026SCATE: Learning to Supervise Coding Agents for Cost-Effective Test Generation9 Jul 2026
- 2025GitChameleon 2.0: Evaluating AI Code Generation Against Python Library Version Incompatibilities16 Jul 2025
- 2025Automated Unit Test Case Generation: A Systematic Literature Review29 Apr 2025
- 2025LLM Test Generation via Iterative Hybrid Program Analysis17 Mar 2025
- 2025MultiFileTest: A Multi-File-Level LLM Unit Test Generation Benchmark and Impact of Error Fixing Mechanisms10 Feb 2025
- 2025Treefix: Enabling Execution with a Tree of Prefixes21 Jan 2025
- 2024LLM-Powered Test Case Generation for Detecting Bugs in Plausible Programs16 Apr 2024
- 2024CSEPrompts: A Benchmark of Introductory Computer Science Prompts3 Apr 2024
- 2024Semi-Instruct: Bridging Natural-Instruct and Self-Instruct for Code Large Language Models1 Mar 2024
- 2024Beyond Accuracy: An Empirical Study on Unit Testing in Open-source Deep Learning Projects26 Feb 2024
- 2024Data-driven Discovery with Large Generative Models21 Feb 2024
6 more
- 2024Code-Aware Prompting: A study of Coverage Guided Test Generation in Regression Setting using LLM31 Jan 2024
- 2023Knowledge Transfer from High-Resource to Low-Resource Programming Languages for Code LLMs19 Aug 2023
- 2023Two is Better Than One: Digital Siblings to Improve Autonomous Driving Testing14 May 2023
- 2023LExecutor: Learning-Guided Execution5 Feb 2023
- 2022Execution-Based Evaluation for Open-Domain Code Generation20 Dec 2022
- 2021Automated Support for Unit Test Generation: A Tutorial Book Chapter26 Oct 2021
- 2022Execution-Based Evaluation for Open-Domain Code Generationcited by 89
- 2024Code-Aware Prompting: A study of Coverage Guided Test Generation in Regression Setting using LLMcited by 63
- 2023Knowledge Transfer from High-Resource to Low-Resource Programming Languages for Code LLMscited by 45
- 2024Data-driven Discovery with Large Generative Modelscited by 33
- 2024LLM-Powered Test Case Generation for Detecting Bugs in Plausible Programscited by 14
- 2025LLM Test Generation via Iterative Hybrid Program Analysiscited by 9
- 2023Two is Better Than One: Digital Siblings to Improve Autonomous Driving Testingcited by 8
- 2023LExecutor: Learning-Guided Executioncited by 7
- 2025MultiFileTest: A Multi-File-Level LLM Unit Test Generation Benchmark and Impact of Error Fixing Mechanismscited by 4
- 2024CSEPrompts: A Benchmark of Introductory Computer Science Promptscited by 3
- 2025Treefix: Enabling Execution with a Tree of Prefixescited by 2
- 2025GitChameleon 2.0: Evaluating AI Code Generation Against Python Library Version Incompatibilitiescited by 2
12 most cited of 15 All 15 (JSON)
- 2025GitChameleon 2.0: Evaluating AI Code Generation Against Python Library Version Incompatibilities16 Jul 2025
- 2025Automated Unit Test Case Generation: A Systematic Literature Review29 Apr 2025
- 2025LLM Test Generation via Iterative Hybrid Program Analysis17 Mar 2025
- 2025MultiFileTest: A Multi-File-Level LLM Unit Test Generation Benchmark and Impact of Error Fixing Mechanisms10 Feb 2025
- 2025Treefix: Enabling Execution with a Tree of Prefixes21 Jan 2025
- 2024LLM-Powered Test Case Generation for Detecting Bugs in Plausible Programs16 Apr 2024
- 2024CSEPrompts: A Benchmark of Introductory Computer Science Prompts3 Apr 2024
- 2024Beyond Accuracy: An Empirical Study on Unit Testing in Open-source Deep Learning Projects26 Feb 2024
- 2024Data-driven Discovery with Large Generative Models21 Feb 2024
- 2024Code-Aware Prompting: A study of Coverage Guided Test Generation in Regression Setting using LLM31 Jan 2024
- 2023Knowledge Transfer from High-Resource to Low-Resource Programming Languages for Code LLMs19 Aug 2023
- 2023Two is Better Than One: Digital Siblings to Improve Autonomous Driving Testing14 May 2023
12 newest of 15 All 15 (JSON)