Abstract
Writing unit tests is a crucial task in software development, but it is also recognized as a time-consuming and tedious task. As such, numerous test generation approaches have been proposed and investigated. However, most of these test generation tools produce tests that are typically difficult to understand. Recently, Large Language Models (LLMs) have shown promising results in generating source code and supporting software engineering tasks. As such, we investigate the usability of tests generated by GitHub Copilot, a proprietary closed-source code generation tool that uses an LLM. We evaluate GitHub Copilot's test generation abilities both within and without an existing test suite, and we study the impact of different code commenting strategies on test generations.Our investigation evaluates the usability of 290 tests generated by GitHub Copilot for 53 sampled tests from open source projects. Our findings highlight that within an existing test suite, approximately 45.28% of the tests generated by Copilot are passing tests; 54.72% of generated tests are failing, broken, or empty tests. Furthermore, if we generate tests using Copilot without an existing test suite in place, we observe that 92.45% of the tests are failing, broken, or empty tests. Additionally, we study how test method comments influence the usability of test generations.
Original language | English |
---|---|
Title of host publication | AST '24: Proceedings of the 5th ACM/IEEE International Conference on Automation of Software Test (AST 2024) |
Place of Publication | New York |
Publisher | ACM |
Pages | 45-55 |
Number of pages | 11 |
ISBN (Print) | 979-8-4007-0588-5 |
DOIs | |
Publication status | Published - 2024 |
Event | 5th ACM/IEEE International Conference on Automation of Software Test, AST 2024, co-located with the 46th International Conference on Software Engineering, ICSE 2024 - Lisbon, Portugal Duration: 15 Apr 2024 → 16 Apr 2024 |
Publication series
Name | Proceedings - 2024 IEEE/ACM International Conference on Automation of Software Test, AST 2024 |
---|
Conference
Conference | 5th ACM/IEEE International Conference on Automation of Software Test, AST 2024, co-located with the 46th International Conference on Software Engineering, ICSE 2024 |
---|---|
Country/Territory | Portugal |
City | Lisbon |
Period | 15/04/24 → 16/04/24 |
Bibliographical note
Green Open Access added to TU Delft Institutional Repository 'You share, we take care!' - Taverne project https://www.openaccess.nl/en/you-share-we-take-careOtherwise as indicated in the copyright section: the publisher is the copyright holder of this work and the author uses the Dutch legislation to make this work public.