Student or educator? Sign up with your school email and get 6 months of Pro free.

The DOI matches its Crossref record; 28 of the 28 references it cites were found in a registry or an index.

Unit Test Generation using Generative AI : A Comparative Performance Analysis of Autogeneration Tools

Open access
Bhatia, Shreya, Gandhi, Tarushi, Kumar, Dhruv, Jalote, Pankaj·2024·Proceedings of the 1st International Workshop on Large Language Models for Code

Abstract

Generating unit tests is a crucial task in software development, demanding substantial time and effort from programmers. The advent of Large Language Models (LLMs) introduces a novel avenue for unit test script generation. This research aims to experimentally investigate the effectiveness of LLMs, specifically exemplified by ChatGPT, for generating unit test scripts for Python programs, and how the generated test cases compare with those generated by an existing unit test generator (Pynguin). For experiments, we consider three types of code units: 1) Procedural scripts, 2) Function-based modular code, and 3) Class-based code. The generated test cases are evaluated based on criteria such as coverage, correctness, and readability. Our results show that ChatGPT's performance is comparable with Pynguin in terms of coverage, though for some cases its performance is superior to Pynguin. We also find that about a third of assertions generated by ChatGPT for some categories were incorrect. Our results also show that there is minimal overlap in missed statements between ChatGPT and Pynguin, thus, suggesting that a combination of both tools may enhance unit test generation performance. Finally, in our experiments, prompt engineering improved ChatGPT's performance, achieving a much higher coverage.*These authors contributed equally.

Overview

Integrity signals

Registry

Crossref · 10.1145/3643795.3648396

Cites

28 of 28 references verified0 citation errors · 0 not checkable

Statistics

Recomputing p-values needs the paper’s full text.

Verification

Claims the paper makes

We couldn’t retrieve this paper’s full text, so its claims and self-check weren’t run. The registry and citation checks still apply.

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

Citations

Cites

Show all 28 references

Research works printed but not linked: 5

  1. Paul F Christiano, Jan Leike, Tom Brown, Miljan Martic, Shane Legg, and Dario Amodei. 2017. Deep Reinforcement Learning from Human Preferences. In Advances in Neural Information Processing Systems, I. Guyon, U. Von Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (Eds.), Vol. 30. Curran Associates, Inc. https://proceedings.neurips.cc/paper_files/paper/2017/file/d5e2c0adad503c91f91df240d0cd4e49-Paper.pdf
  2. Shuvendu K. Lahiri, Sarah Fakhoury, Aaditya Naik, Georgios Sakkas, Saikat Chakraborty, Madanlal Musuvathi, Piali Choudhury, Curtis von Veh, Jeevana Priya Inala, Chenglong Wang, and Jianfeng Gao. 2023. Interactive Code Generation via Test-Driven User-Intent Formalization. arXiv:2208.05950 [cs.SE] · arXiv
  3. Zhuokui Xie Yinghao Chen Chen Zhi Shuiguang Deng and Jianwei Yin. 2023. ChatUniTest: a ChatGPT-based automated unit test generation tool. arXiv:2305.04764 [cs.SE] · arXiv
  4. Shengcheng Yu Chunrong Fang Yuchen Ling Chentian Wu and Zhenyu Chen. 2023. LLM for Test Script Generation and Migration: Challenges Capabilities and Opportunities. arXiv:2309.13574 [cs.SE] · arXiv
  5. 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. arXiv:2305.04207 [cs.SE] · arXiv

Cited by

See all 55

Metadata

Authors
Bhatia, S., Gandhi, T., Kumar, D., & Jalote, P.
Affiliations
Indraprastha Institute of Information Technology Delhi (IN)
Venue
Proceedings of the 1st International Workshop on Large Language Models for Code
Publisher
ACM
Published
2024-04-20
Pages
54-61
OpenAlex
W4402410897
Cited by
55
References
28
Citations by year
2026: 19 · 2025: 30 · 2024: 6
FWCI
14.96
Type
conference paper
Language
en
Open access
Locations
  • International Workshop on Large Language Models for Code (LLM4Code) (publishedVersion)
  • arXiv (Cornell University) (submittedVersion)
  • arXiv (Cornell University)
Topics
  • Physical Sciences › Computer Science › Software › Software Testing and Debugging Techniques
  • Physical Sciences › Computer Science › Information Systems › Software Engineering Research
  • Physical Sciences › Computer Science › Information Systems › Software Engineering Techniques and Practices
Keywords
unit test generation, generative AI, large language models, ChatGPT, Python, test coverage, prompt engineering, procedural codes

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review

How to cite

Cite CoChat for the checks on this page, and the paper for its own findings.

This page
CoChat. (2026). Citation check: Unit Test Generation using Generative AI : A Comparative Performance Analysis of Autogeneration Tools. https://app.cochat.ai/papers/10.1145/3643795.3648396
The paper
Bhatia, S., Gandhi, T., Kumar, D., & Jalote, P. (2024). Unit Test Generation using Generative AI : A Comparative Performance Analysis of Autogeneration Tools. Proceedings of the 1st International Workshop on Large Language Models for Code. https://doi.org/10.1145/3643795.3648396

Data sources

Bibliographic data: Semantic Scholar, OpenAlex, Crossref.

Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).

Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.