Unit Test Case Generation using Large Language Models for Students in Computer Programming

Read the full article See related articles

Discuss this preprint

Start a discussion What are Sciety discussions?

Listed in

This article is not in any list yet, why not save it to one of your lists.
Log in to save this article

Abstract

Software testing is an essential part of the software development life cycle that helps detect some of the potential defects automatically and lower maintenance costs. Automated test case generation can offer significant benefits in terms of efficiency, coverage, and help in assessing the quality of the student-written software implementations. It automates time-consuming manual test case generation for students, specifically those who are new problem solvers, and can help them to focus on more exploratory tasks, also generating more consistent and reliable test cases than manual approaches. Due to these promising opportunities for students, we require an automated method for generating test cases. Therefore, in this research, we introduce TestT5, an LLM-based approach using the openly available methods2test dataset extracted from a vast collection of Java software repositories, designed to generate unit test cases automatically and demonstrate that it can assist students in unit testing on their programming assignments, projects, and can also assess the quality of their implementations. We also gathered feedback from professionals and conducted a human evaluation to assess the generated unit test cases in terms of understandability, readability, and testing effectiveness, along with future research opportunities.

Article activity feed