Software testing is a critical phase in the development lifecycle, ensuring the reliability and correctness of software systems. Traditional test case generation can be time-consuming and labor-intensive, often requiring significant manual effort. With the rapid advancement of generative AI, tools like ChatGPT and Gemini offer new possibilities for automating this process. This paper investigates the application of these AI-driven tools for test case generation, evaluating their effectiveness in achieving comprehensive code coverage across diverse programming problems. This paper investigates the application of generative AI tools, specifically ChatGPT and Gemini, for automating test case generation in software testing. By analyzing source code from 30 programming problems across various topics, including loops, conditionals, arrays, strings, and recursion, the study evaluates the tools’ effectiveness in achieving comprehensive code coverage. The research addresses key questions regarding the quality, coverage, and efficiency of AI-generated test cases compared to manual efforts. The findings reveal that ChatGPT consistently outperforms Gemini in accuracy, adaptability, and handling of complex constructs, such as recursive algorithms and nested structures. While both tools reduce the manual effort required for test case generation, Gemini shows limitations in achieving full coverage for advanced scenarios. These results underscore the potential of generative AI to streamline software testing workflows, freeing developers to focus on higher-order problem-solving. However, the study also highlights the need for further refinement of these tools to enhance their reliability and robustness. This work provides a foundational step toward leveraging generative AI to transform software development and testing practices.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Automated Test Case Generation for Software Testing Using Generative AI

  • Ajay Bandi,
  • Harsha Sai Teja Nukala,
  • Bhavya Tatavarthi,
  • Amulya Boggavarapu

摘要

Software testing is a critical phase in the development lifecycle, ensuring the reliability and correctness of software systems. Traditional test case generation can be time-consuming and labor-intensive, often requiring significant manual effort. With the rapid advancement of generative AI, tools like ChatGPT and Gemini offer new possibilities for automating this process. This paper investigates the application of these AI-driven tools for test case generation, evaluating their effectiveness in achieving comprehensive code coverage across diverse programming problems. This paper investigates the application of generative AI tools, specifically ChatGPT and Gemini, for automating test case generation in software testing. By analyzing source code from 30 programming problems across various topics, including loops, conditionals, arrays, strings, and recursion, the study evaluates the tools’ effectiveness in achieving comprehensive code coverage. The research addresses key questions regarding the quality, coverage, and efficiency of AI-generated test cases compared to manual efforts. The findings reveal that ChatGPT consistently outperforms Gemini in accuracy, adaptability, and handling of complex constructs, such as recursive algorithms and nested structures. While both tools reduce the manual effort required for test case generation, Gemini shows limitations in achieving full coverage for advanced scenarios. These results underscore the potential of generative AI to streamline software testing workflows, freeing developers to focus on higher-order problem-solving. However, the study also highlights the need for further refinement of these tools to enhance their reliability and robustness. This work provides a foundational step toward leveraging generative AI to transform software development and testing practices.