Category of Work
Conference
Title of Conference/Lecture Series
The 22nd International Conference on Information Technology - New Generations (ITNG 2025)
Abstract
Software testing verifies that the software is free of defects and meets its requirements. This process includes various levels, one of which is unit testing, where developers create test cases alongside their regular code, and use frameworks, such as JUnit for Java, to enable a frequent automated execution of these test cases. However, designing test cases remains a significant challenge. Graph-based testing offers a solution by representing units in the source code as graphs, with nodes representing basic code blocks and edges representing transitions or interactions between these nodes. Additionally, modern Generative AI (GenAI) models, including ChatGPT, Gemini, and Copilot, present new opportunities for enhancing the software testing process. This paper investigates the potential of using GenAI models to automate and improve unit testing, particularly through graph-based methods. Experiments are designed to evaluate these models, assessing their ability to reduce manual effort while improving test coverage, efficiency, and code quality. The results reveal that GenAI models can streamline test generation and execution, but their effectiveness heavily relies on prompt quality and they lack an inherent understanding of program logic. In contrast, traditional graph-based unit testing ensures comprehensive coverage through systematic exploration of control flow paths but is resource-intensive. AQ1 Therefore, this paper recommends a hybrid approach that combines the automation capabilities of GenAI with the rigor of traditional methods to achieve robust and efficient software testing.
First Page
433
Last Page
444
DOI
https://doi.org/10.1007/978-3-031-89063-5_37
Presentation Date
4-29-2025
Recommended Citation
Masood, Abubakr S.; Ali, Mir H.; Amair, Mohammed W.; Al-Sharif, Ziad A.; and Omari, Safwan, "The Use of GenAI in Graph Based Unit Testing" (2025). Engineering, Computing and Mathematical Sciences Faculty Conferences. 4.
https://digitalcommons.lewisu.edu/ecms_faccons/4