Volume 19 Number 4 (2024)
Home > Archive > 2024 > Volume 19 Number 4 (2024) >
JSW 2024 Vol.19(4): 108-120
doi: 10.17706/jsw.19.4.108-120

AutoTestGPT: A System for the Automated Generation of Software Test Cases based on ChatGPT

Hui Liu1, Liang Liu1, Caijie Yue1, Yang Wang1,*, and Bo Deng2
1. Suzhou Technological Garden, Aerospace Information Research Institute, Chinese Academy of Sciences, Dushu Lake Road No.158, Suzhou Industrial Park, Jiangsu Province, 215000, China
2. Aerospace Information Research Institute, Chinese Academy of Sciences, Dengzhuang South Road No.9, Haidian District, Beijing, 100094, China.
*Corresponding author. Tel.: 0512-69836920; email: wangyang@aircas.ac.cn (Y.W.)

Manuscript submitted July 25, 2024; revised November 20, 2024; accepted November 26, 2024; published December 20, 2024.


Abstract—The design and generation of software test cases stand as critical steps in elevating the levels of automation and intelligence in software testing. Given the robust natural language understanding and code generation capabilities of ChatGPT, this paper, after extensive research on ChatGPT’s applications in the field of software testing in recent years, introduces a ChatGPT-based software test case auto-generation system named AutoTestGPT. This system leverages ChatGPT as its intelligent engine to conduct dialogue training. It extracts key information from structured testing requirements, leading to the formulation of comprehensive testing plans. Subsequently, it systematically generates corresponding test cases according to the devised plans. Finally, the system executes the generated test cases, conducts result verification, and generates detailed testing reports. Experimental results within the API testing framework and test case generation demonstrate that the API testing framework generated using AutoTestGPT exhibits high usability. In comparison to manually coding and constructing test frameworks, the time required for test framework generation is reduced by over 70%. AutoTestGPT demonstrates high efficiency in handling complex test case generation tasks, thereby enhancing the automation and intelligence levels in test case generation. This system lays a robust foundation for the establishment of intelligent systems in software testing for the future.

Keywords—automated test case generation, ChatGPT, intelligent testing

[PDF]

Cite: Hui Liu, Liang Liu, Caijie Yue, Yang Wang, and Bo Deng, "AutoTestGPT: A System for the Automated Generation of Software Test Cases based on ChatGPT," Journal of Software, vol. 19, no. 4, pp. 108-120, 2024.


Copyright @ 2024 by the authors. This is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited (CC BY 4.0)

General Information

  • ISSN: 1796-217X (Online)

  • Abbreviated Title: J. Softw.

  • Frequency:  Quarterly

  • APC: 500USD

  • DOI: 10.17706/JSW

  • Editor-in-Chief: Prof. Antanas Verikas

  • Executive Editor: Ms. Cecilia Xie

  • Abstracting/ Indexing: DBLP, EBSCO,
           CNKIGoogle Scholar, ProQuest,
           INSPEC(IET), ULRICH's Periodicals
           Directory, WorldCat, etc

  • E-mail: jsweditorialoffice@gmail.com

  • Oct 22, 2024 News!

    Vol 19, No 3 has been published with online version   [Click]

  • Jan 04, 2024 News!

    JSW will adopt Article-by-Article Work Flow

  • Apr 01, 2024 News!

    Vol 14, No 4- Vol 14, No 12 has been indexed by IET-(Inspec)     [Click]

  • Apr 01, 2024 News!

    Papers published in JSW Vol 18, No 1- Vol 18, No 6 have been indexed by DBLP   [Click]

  • Jun 12, 2024 News!

    Vol 19, No 2 has been published with online version   [Click]