1. 广东工业大学 计算机学院,广东,广州,510006
2. 广东工业大学 自动化学院,广东,广州,510006
罗嘉乐(1998–),男,硕士研究生,主要研究方向为软件测试、人工智能与大模型,E-mail:2112205036@mail2.gdut.edu.cn
王涛(1983–),男,副教授,博士,主要研究方向为人工智能与大模型、工业大数据与知识自动化、智能工业机器人与具身智能,E-mail:wangtao_cps@gdut.edu.cn
纸质出版:2026
移动端阅览
罗嘉乐, 王涛, 程良伦, 等. 基于大语言模型的组件化工业软件系统测试用例生成方法[J]. 广东工业大学学报, 2026, 43(4): 91-102.
罗嘉乐, 王涛, 程良伦, 等. 基于大语言模型的组件化工业软件系统测试用例生成方法[J]. 广东工业大学学报, 2026, 43(4): 91-102. DOI: 10.12052/gdutxb.250017.
近年来,随着软件复杂度的增加,传统手动和部分自动化的测试方法难以满足系统测试工作的效率需求,尤其在应对快速变化和高度定制的工业软件系统时,测试覆盖率和效率往往不足。为此,本文提出了一种基于大语言模型的组件化工业软件系统测试用例生成方法,旨在提高测试工作的灵活性和效率。该方法采用大语言模型将用户描述转化为测试用例,结合分步生成策略,涵盖测试用例生成、修正及生成测试代码3个步骤。首先,系统从用户输入开始,结合知识库生成初步测试用例数据。随后,利用Petri网模型对生成的测试用例路径进行修正,确保测试流程的准确性。最后,通过模块化生成核心业务代码,加速测试用例的部署。实验结果表明,该方法在组件化工业软件系统测试中展现了良好的自动化能力,显著提升了测试效率和覆盖率。
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.
WANG B, TAO F, FANG X, et al . Smart manufacturing and intelligent manufacturing: a comparative review[J ] . Engineering, 2021, 7(6): 738-757.
NODA K, NEMOTO Y, HOTTA K, et al . Experience report: how effective is automated program repair for industrial software?[C ] //2020 IEEE 27th International Conference on Software Analysis, Evolution and Reengineering (SANER) . Piscataway: IEEE, 2020: 612-616.
EHSAN A, ABUHALIQA M A M E, CATAL C, et al . RESTful API testing methodologies: rationale, challenges, and solution directions[J ] . Applied Sciences, 2022, 12(9): 4369.
WANG L, MA C, FENG X, et al . A survey on large language model based autonomous agents[J ] . Frontiers of Computer Science, 2024, 18(6): 186345.
NARAYANAN D, SHOEYBI M, CASPER J, et al . Efficient large-scale language model training on gpu clusters using megatron-lm[C ] //Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis. Saint Louis City: IEEE Computer Society, 2021: 1-15.
MARTIN-LOPEZ L, SEGURA S, RUIZ-CORTES C. RESTest: black-box constraint-based testing of RESTful web APIs[C]//International Conference on Service-Oriented Computing. Cham: Springer International Publishing, 2020: 459-475.
PRAYOGI A A, NISWAR M, RIJAl M. Design and implementation of REST API for academic information system[J]. IOP Conference Series: Materials Science and Engineering, 2020, 875(1): 012047.
KASNECI E, SEBLER K, KUCHEMANN S, et al . ChatGPT for good? on opportunities and challenges of large language models for education[J ] . Learning and Individual Differences, 2023, 103: 102274.
FORELL M, SCHULER S. Modeling meets large language models[C]//Modellierung 2024 Satellite Events. Bonn: Gesellschaft für Informatik e. V. , 2024: 10-18420.
RYAN G, JAIN S, SHANG M, et al . Code-aware prompting: a study of coverage-guided test generation in regression setting using LLM[J ] . Proceedings of the ACM on Software Engineering, 2024, 1: 951-971.
GU Q. LLM-based code generation method for Golang compiler testing[C]//Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering. New York: ACM, 2023: 2201-2203.
DAFFLON B, MOALLA N, OUZROUT Y. The challenges, approaches, and used techniques of CPS for manufacturing in industry 4.0: a literature review[J]. The International Journal of Advanced Manufacturing Technology, 2021, 113: 2395-2412.
SANCHEZ M, EXPOSITO E, AGUILAR J. Autonomic computing in manufacturing process coordination in industry 4.0 context[J]. Journal of Industrial Information Integration, 2020, 19: 100159.
HAGHNEGAHDAR L, JOSHI S S, DAHITRE N B. From IoT-based cloud manufacturing approach to intelligent additive manufacturing: industrial internet of things-an overview[J]. The International Journal of Advanced Manufacturing Technology, 2022, 119(3): 1461-1478.
REYNOLDS L, MCDONELL K. Prompt programming for large language models: beyond the few-shot paradigm[C]//Extended Abstracts of the 2021 CHI Conference on Human Factors in Computing Systems. New York: ACM, 2021: 1-7.
KUBLIK S, SABOO S. GPT-3: the ultimate guide to building NLP products with OpenAI API[M]. Birmingham, UK: Packt Publishing Ltd, 2023.
ARURI A, CAMPOS J, FRASER G. Unit test generation during software development: evosuite plugins for maven, intelliJ and jenkins[C]//Proceedings of the 2016 IEEE International Conference on Software Testing, Verification and Validation (ICST) . Piscataway, NJ: IEEE, 2016: 401-408.
CHEN Y, HU Z, ZHI C, et al . ChatUniTest: a framework for LLM-based test generation[C ] //Proceedings of the 32nd ACM International Conference on the Foundations of Software Engineering. New York: ACM, 2024: 572-576.
0
浏览量
0
下载量
0
CSCD
关联资源
相关文章
相关作者
相关机构
京公网安备11010802024621