Abstract:
In recent years, with the increasing complexity of software, traditional manual and partially automated testing methods have found it difficult to meet the efficiency requirements of system testing work, especially when dealing with rapidly changing and highly customized industrial software systems, where testing coverage and efficiency are often insufficient. Therefore, in this research, a component-based industrial software system test case generation method is proposed based on a large language model, aiming to improve the flexibility and efficiency of testing work. This method uses a large language model to convert user descriptions into test cases, combined with a step-by-step generation strategy, covering three stages: test case generation, correction, and test code generation. Firstly, the system starts from user input and generates preliminary test case data based on the knowledge base. Subsequently, the Petri net model is used to modify the generated test case paths to ensure the accuracy of the testing process. Finally, by modularizing the generation of core business code, the deployment of test cases can be accelerated. The experimental results show that this method demonstrates good automation capabilities in component-based industrial software system testing, significantly improving testing efficiency and coverage.